-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (33 loc) · 1.21 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
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(oopp VERSION 1.0.0 LANGUAGES CXX)
find_package(OpenMP 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}/oopp)
############################################################
# Unit tests
############################################################
macro(add_test name)
add_executable(${name} ./tests/${name}.cpp)
target_link_libraries(${name})
target_precompile_headers(${name} PUBLIC oopp/precompiled.h)
endmacro()
add_test(test_classify)
add_test(test_dataframe)
add_test(test_oopp)
add_test(test_utils)
############################################################
# Applications
############################################################
macro(add_app name)
add_executable(${name} ./apps/${name}.cpp)
target_link_libraries(${name})
target_precompile_headers(${name} PUBLIC oopp/precompiled.h)
endmacro()
add_app(classify)
add_app(score)