-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
46 lines (36 loc) · 1.4 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
cmake_minimum_required(VERSION 3.12)
project(shashki_ai LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_COMPILER /usr/bin/clang++-15)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
# set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -DNDEBUG -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -g -march=native") # assertions still enabled
# set include and library directories
include_directories(include)
link_directories(lib)
# find sources
file(GLOB_RECURSE SOURCES src/*.cc src/**/*.cc)
# find external objects libraries to link in
file(GLOB_RECURSE OBJS lib/*.o)
SET_SOURCE_FILES_PROPERTIES(
${OBJS}
PROPERTIES
EXTERNAL_OBJECT true
GENERATED true
)
# declare executable
add_executable(shashki_ai ${OBJS} ${SOURCES})
# Pistache: link statically
target_include_directories(shashki_ai PRIVATE pistache/prefix/include)
target_link_directories(shashki_ai PRIVATE pistache/build/src)
target_link_libraries(shashki_ai PRIVATE pistache)
# Eigen3 (header-only), only needed when building against CMA-ES (global optimization
# technique), see `experimental` directory for details
#
# find_package(Eigen3 3.3 REQUIRED)
# target_link_libraries(shashki_ai Eigen3::Eigen)
# Catboost model loader, only needed when we use Yandex's gradient boosting framework,
# see `experimental` dir; libcatboostmodel.so needs to be built separately
#
# target_link_libraries(shashki_ai catboostmodel)