-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (36 loc) · 1.32 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.18)
project(sgbust)
add_executable(sgbust
src/cli/commands.cpp
src/cli/parser.cpp
src/cli/utils.cpp
src/core/CompactGrid.cpp
src/core/Grid.cpp
src/core/MemoryUsage.cpp
src/core/Polynom.cpp
src/core/scorings/GreedyScoring.cpp
src/core/scorings/NumBlocksNotInGroupsScoring.cpp
src/core/scorings/PotentialScoring.cpp
src/core/Solution.cpp
src/core/Solver.cpp
src/main.cpp
)
target_compile_features(sgbust PRIVATE cxx_std_20)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(sgbust PRIVATE "/Zc:__cplusplus")
endif()
target_include_directories(sgbust PRIVATE include)
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
find_package(TBB CONFIG REQUIRED)
target_link_libraries(sgbust PRIVATE TBB::tbb)
endif()
find_package(CLI11 CONFIG REQUIRED)
target_link_libraries(sgbust PRIVATE CLI11::CLI11)
find_package(mdspan CONFIG REQUIRED)
target_link_libraries(sgbust PRIVATE std::mdspan)
find_package(mimalloc CONFIG REQUIRED)
target_link_libraries(sgbust PRIVATE mimalloc)
find_path(PARALLEL_HASHMAP_INCLUDE_DIRS "parallel_hashmap/phmap.h" REQUIRED)
target_include_directories(sgbust PRIVATE ${PARALLEL_HASHMAP_INCLUDE_DIRS})
find_path(WYHASH_INCLUDE_DIRS "wyhash.h" REQUIRED)
target_include_directories(sgbust PRIVATE ${WYHASH_INCLUDE_DIRS})