-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (36 loc) · 1.51 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
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(ATL24_coastnet VERSION 1.0.0 LANGUAGES CXX)
find_package(OpenMP REQUIRED)
find_package(CUDAToolkit REQUIRED)
find_package(xgboost REQUIRED)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 20)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow ${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/ATL24_coastnet)
############################################################
# Unit tests
############################################################
macro(add_test name)
add_executable(${name} ./tests/${name}.cpp)
target_link_libraries(${name})
target_link_libraries(${name} xgboost::xgboost)
endmacro()
add_test(test_blunder_detection)
add_test(test_classify)
add_test(test_pgm)
add_test(test_dataframe)
############################################################
# Applications
############################################################
add_executable(train ./apps/train.cpp)
target_link_libraries(train xgboost::xgboost)
target_precompile_headers(train PUBLIC ATL24_coastnet/precompiled.h)
add_executable(classify ./apps/classify.cpp)
target_link_libraries(classify xgboost::xgboost)
target_precompile_headers(classify PUBLIC ATL24_coastnet/precompiled.h)
add_executable(score ./apps/score.cpp)
target_precompile_headers(score PUBLIC ATL24_coastnet/precompiled.h)