-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (53 loc) · 1.41 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
53
54
55
56
57
58
59
60
61
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(
"cspc"
VERSION 0.0
LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(CSPC_BUILD_TESTS "Build tests" ON)
option(CSPC_BUILD_EXAMPLES "Build examples" ON)
option(CSPC_BUILD_PROFILER "Build profiler" ON)
add_subdirectory(external)
add_library(${PROJECT_NAME}
"include/cspc/data_structures.hpp"
"include/cspc/kissat.hpp"
"include/cspc/minizinc.hpp"
"include/cspc/algorithms.hpp"
"include/cspc/encodings/common.hpp"
"include/cspc/encodings/direct.hpp"
"include/cspc/encodings/binary.hpp"
"include/cspc/encodings/label_cover.hpp"
"src/minizinc.cpp"
"src/kissat.cpp"
"src/encodings/common.cpp"
"src/encodings/direct.cpp"
"src/encodings/binary.cpp"
"src/encodings/label_cover.cpp"
"src/algorithms.cpp")
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20)
target_compile_options(${PROJECT_NAME} PRIVATE
-Wall
-Wextra
-Wpedantic
$<$<CONFIG:Debug>:-g>
$<$<CONFIG:Release>:-O3>)
target_include_directories(${PROJECT_NAME} PUBLIC
"include/"
)
target_link_libraries(${PROJECT_NAME}
external_fmt
external_spdlog
external_kissat
external_gautil
${CMAKE_THREAD_LIBS_INIT}
)
if (CSPC_BUILD_TESTS)
add_subdirectory(tests)
endif()
if (CSPC_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (CSPC_BUILD_PROFILER)
add_subdirectory(profiler)
endif()