-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
52 lines (42 loc) · 1.72 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.15...3.22)
file(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt PACKAGE_VERSION)
string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
set(CMAKE_EXPORT_COMPILE_COMMANDS On)
project(vowpal_wabbit_next VERSION "${PACKAGE_VERSION}")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_subdirectory(ext_libs/pybind11)
option(VW_NEXT_VENDOR_ALL "Vendor all deps" OFF)
SET(VW_CXX_STANDARD "17" CACHE STRING "" FORCE)
SET(VW_BUILD_VW_C_WRAPPER OFF CACHE BOOL "" FORCE)
SET(BUILD_TESTING OFF CACHE BOOL "" FORCE)
SET(VW_FEAT_LAS_SIMD ON CACHE BOOL "" FORCE)
SET(VW_FEAT_CB_GRAPH_FEEDBACK ON CACHE BOOL "" FORCE)
if (VW_NEXT_VENDOR_ALL)
SET(FMT_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(RAPIDJSON_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(SPDLOG_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(VW_BOOST_MATH_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(VW_EIGEN_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(VW_ZLIB_SYS_DEP OFF CACHE BOOL "" FORCE)
SET(VW_SSE2NEON_SYS_DEP OFF CACHE BOOL "" FORCE)
else()
SET(FMT_SYS_DEP ON CACHE BOOL "" FORCE)
SET(RAPIDJSON_SYS_DEP ON CACHE BOOL "" FORCE)
SET(SPDLOG_SYS_DEP ON CACHE BOOL "" FORCE)
SET(VW_BOOST_MATH_SYS_DEP ON CACHE BOOL "" FORCE)
SET(VW_EIGEN_SYS_DEP ON CACHE BOOL "" FORCE)
SET(VW_ZLIB_SYS_DEP ON CACHE BOOL "" FORCE)
SET(VW_SSE2NEON_SYS_DEP ON CACHE BOOL "" FORCE)
endif()
add_subdirectory(ext_libs/vowpal_wabbit EXCLUDE_FROM_ALL)
pybind11_add_module(_core MODULE
src/cpp/main.cpp
src/cpp/label.cc
src/cpp/prediction.cc
src/cpp/debug_reduction.cc
)
target_compile_definitions(_core PRIVATE VERSION_INFO=${PROJECT_VERSION})
target_link_libraries(_core PRIVATE vw_core)
install(TARGETS _core DESTINATION .)