forked from namazso/OpenHashTab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (50 loc) · 1.65 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
68
cmake_minimum_required(VERSION 3.15)
project(OpenHashTab)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
string(REGEX REPLACE "/Ob1" "/Ob2" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REGEX REPLACE "/Ob1" "/Ob2" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
add_compile_options(
-flto
/guard:cf
)
add_link_options(
/BREPRO
/PDBALTPATH:%_PDB%
/FILEALIGN:0x1000
/cetcompat
/guard:cf
/OPT:REF
/OPT:ICF=10
)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# https://gitlab.kitware.com/cmake/cmake/-/issues/25012
# https://github.com/llvm/llvm-project/issues/63426
set(CMAKE_RC_FLAGS "-C65001")
set(CTRE_BUILD_TESTS OFF)
set(CTRE_BUILD_PACKAGE OFF)
add_subdirectory(compile-time-regular-expressions)
add_subdirectory(concurrentqueue)
add_library(tiny-json STATIC tiny-json/tiny-json.c)
target_include_directories(tiny-json PUBLIC tiny-json)
add_compile_options(
-Wall
-Wpedantic
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-pre-c++17-compat
-Wno-unsafe-buffer-usage
-Wno-old-style-cast
-Wno-shadow-field-in-constructor
-Wno-language-extension-token
-Wno-ctad-maybe-unsupported
$<$<CONFIG:Debug>:-fsanitize=undefined>
$<$<CONFIG:Debug>:-fsanitize-trap>
)
add_subdirectory(AlgorithmsDlls)
add_subdirectory(Localization)
add_subdirectory(LegacyAlgorithms)
add_subdirectory(Benchmark)
add_subdirectory(OpenHashTab)
add_subdirectory(StandaloneStub)