forked from Desbordante/desbordante-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (52 loc) · 1.76 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
62
cmake_minimum_required(VERSION 3.10)
project(Desbordante)
# By default select Debug build
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif(NOT CMAKE_BUILD_TYPE)
# compiler and platform-dependent settings
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/target")
if (MSVC)
add_compile_options(/MT /MTd /EHsc)
add_compile_options("$<$<CONFIG:Release>:/O2>")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/target")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/target")
else()
# -DELPP_THREAD_SAFE -- for easylogging++ thread safety
add_compile_options("$<$<CONFIG:Debug>:-O0;-DELPP_THREAD_SAFE;-g;-Wall;-Wextra;-Werror;-fno-omit-frame-pointer;-fsanitize=address>")
add_link_options("$<$<CONFIG:Debug>:-fsanitize=address>")
add_compile_options("$<$<CONFIG:Release>:-O3;-DELPP_THREAD_SAFE>")
endif()
# configuring boost
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.72.0 REQUIRED COMPONENTS container program_options thread)
include_directories(${Boost_INCLUDE_DIRS})
message(${Boost_INCLUDE_DIRS})
# providing subdirectories for header inclusion
include_directories(
"src/algorithms"
"src/algorithms/DFD"
"src/algorithms/association-rules"
"src/algorithms/depminer"
"src/model"
"src/model/types"
"src/util"
"src/parser"
"src/parser/json"
"src/tests"
"src/core"
"src/caching"
"src/logging"
"src"
"lib/easyloggingpp/src"
"lib/better-enums/"
)
# adding submodules
add_subdirectory("lib/googletest")
option(build_static_lib "Build easyloggingpp as a static library" ON)
add_subdirectory("lib/easyloggingpp")
add_subdirectory("src")
add_subdirectory("tests")
add_subdirectory("datasets")
add_subdirectory("cfg")