-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
68 lines (48 loc) · 1.85 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.31)
project(xnu-trace CXX C)
set(BUILD_SHARED_LIBS OFF)
# set(CMAKE_OSX_ARCHITECTURES arm64e)
set(CMAKE_XCODE_ATTRIBUTE_COMPILER_INDEX_STORE_ENABLE NO)
option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." ON)
if (${FORCE_COLORED_OUTPUT})
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-fdiagnostics-color=always)
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
add_compile_options(-fcolor-diagnostics)
endif ()
endif ()
add_compile_options(-fstrict-vtable-pointers)
add_link_options(-fstrict-vtable-pointers)
add_compile_options(-ggdb3)
# add_compile_options(-g0)
# add_compile_options(-O0 -fno-omit-frame-pointer)
# add_compile_options(-Os -fvisibility=hidden -fvisibility-inlines-hidden -ffunction-sections -fdata-sections)
# add_link_options(-Os -Wl,-dead_strip)
add_compile_options(-Og)
add_link_options(-Og)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
# add_compile_options(-fsanitize=memory)
# add_link_options(-fsanitize=memory)
# add_compile_options(-O3)
# add_link_options(-O3)
# add_compile_options(-Ofast)
# add_link_options(-Ofast)
# add_compile_options(-flto=full -fwhole-program-vtables -fvirtual-function-elimination)
# add_link_options(-flto=full)
# lol just don't its so bad
# add_compile_options(-fno-inline)
# add_link_options(-fno-inline)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
add_compile_options(-ferror-limit=100)
add_compile_options(-Wno-documentation)
endif()
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_EXTENSIONS YES)
option(FMT_DOC OFF)
option(FMT_TEST OFF)
add_subdirectory(3rdparty)
add_subdirectory(lib)
add_subdirectory(test)
add_subdirectory(tools)
add_subdirectory(unit-tests)