-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (35 loc) · 1.22 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.2.0)
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
cmake_policy(SET CMP0074 OLD)
endif()
option(BUILD_WITH_CONTRACTS "build with contract checks" ON)
option(ENABLE_STACKTRACE "print a stacktrace when failing" ON)
option(USE_KORALI "compile and link to korali (for testing only)" OFF)
option(USE_SMARTIES "compile the apps that need smarties" ON)
# Choose Release mode as default.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release"
FORCE)
endif()
list( APPEND CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake/Modules
${CMAKE_SOURCE_DIR}/extern/sanitizers-cmake/cmake
)
find_package(Sanitizers)
project(msode LANGUAGES CXX VERSION 0.1.0)
enable_testing()
set(LIB_NAME_MSODE msode)
set(msode_definitions "")
if (BUILD_WITH_CONTRACTS)
set(msode_definitions "${msode_definitions};-DMSODE_FAIL_ON_CONTRACT")
endif()
set(JSON_BuildTests OFF CACHE INTERNAL "")
add_subdirectory(extern/json)
if (ENABLE_STACKTRACE)
find_package(LIBBFD REQUIRED)
set(msode_definitions "${msode_definitions};-DMSODE_ENABLE_STACKTRACE")
endif()
add_subdirectory(src)
add_subdirectory(units)
add_subdirectory(apps)