forked from minneyar/xenoprobes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (43 loc) · 1.06 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.8)
project (xenoprobes
VERSION 1.0.0
LANGUAGES CXX)
find_package (Threads)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package (Boost COMPONENTS filesystem program_options system REQUIRED)
if(MSVC)
add_compile_options(
$<$<CONFIG:>:/MT> #---------|
$<$<CONFIG:Debug>:/MTd> #---|-- Statically link the runtime libraries
$<$<CONFIG:Release>:/MT> #--|
)
endif()
add_executable(${PROJECT_NAME})
if (MSVC)
set_target_properties(${PROJECT_NAME} PROPERTIES
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
CXX_STANDARD 14
)
else()
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 14)
endif()
target_sources(${PROJECT_NAME} PRIVATE
src/main.cpp
src/ore.cpp
src/probe_arrangement.cpp
src/probe.cpp
src/probe_optimizer.cpp
src/site.cpp
src/site_list.cpp
src/solution.cpp
src/semaphore.cpp
)
target_link_libraries (${PROJECT_NAME}
PRIVATE
Boost::filesystem
Boost::program_options
Boost::system
Threads::Threads
$<IF:$<BOOL:MSVC>,,-static>
)