-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (29 loc) · 1001 Bytes
/
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
# CMakeLists.txt
# By Sebastian Raaphorst, 2018.
cmake_minimum_required(VERSION 3.12)
project(sudoku_stochastic_top)
set(CMAKE_CXX_STANDARD 17)
if (MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wextra -Wpedantic -std=c++17 -O3)
endif()
# Find includes in corresponding build directories.
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_definitions(-DBOOST_LOG_DYN_LINK)
find_package(Boost 1.68 COMPONENTS program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
include_directories(
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src/stochastic
${PROJECT_SOURCE_DIR}/src/gensudoku
)
find_package(OpenMP REQUIRED)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
add_subdirectory(src)
add_subdirectory(apps)