-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
68 lines (52 loc) · 1.64 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
63
64
65
66
67
CMAKE_MINIMUM_REQUIRED(VERSION 3.30)
PROJECT(StormWeaver)
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET( CMAKE_EXPORT_COMPILE_COMMANDS ON )
enable_testing()
option(WITH_ASAN "Build with address sanitizer")
option(WITH_UBSAN "Build with undefined behavior sanitizer")
option(WITH_TSAN "Build with thread sanitizer")
option(WITH_MSAN "Build with memory sanitizer")
if (WITH_ASAN)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif ()
if (WITH_UBSAN)
add_compile_options(-fsanitize=undefined)
add_link_options(-fsanitize=undefined)
endif ()
if (WITH_TSAN)
add_compile_options(-fsanitize=thread)
add_link_options(-fsanitize=thread)
endif ()
if (WITH_MSAN)
add_compile_options(-fsanitize=memory)
add_link_options(-fsanitize=memory)
endif ()
if (WITH_ASAN OR WITH_UBSAN OR WITH_TSAN OR WITH_MSAN)
add_compile_options(-fno-omit-frame-pointer)
endif()
include(CheckCXXSymbolExists)
CHECK_CXX_SYMBOL_EXISTS(_LIBCPP_VERSION version LIBCPP)
if(LIBCPP)
add_compile_options(-fexperimental-library)
endif()
find_package(Threads REQUIRED)
#find_package(libmysqlclient REQUIRED)
find_package(libpqxx REQUIRED)
find_package(Catch2 REQUIRED)
find_package(Boost REQUIRED)
find_package(reflectcpp REQUIRED)
find_package(Git REQUIRED)
find_package(Sol2 REQUIRED)
find_package(spdlog REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(tomlplusplus REQUIRED)
find_package(magic_enum REQUIRED)
INCLUDE(PQSetupCompiler)
INCLUDE(PQCPack)
INCLUDE(PQFindRevision)
INCLUDE(LuaModules)
add_subdirectory(libstormweaver)
add_subdirectory(stormweaver)