-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
56 lines (49 loc) · 1.21 KB
/
CMakeLists.txt
File metadata and controls
56 lines (49 loc) · 1.21 KB
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
cmake_minimum_required(VERSION 3.0...4.0)
project(Flock)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Compiler / Linker options
if (MSVC)
add_compile_options(
/DNOMINMAX
/DWIN32_LEAN_AND_MEAN
)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
add_link_options(-fuse-ld=lld)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-changes-meaning)
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (MSVC)
add_compile_options(
/MDd
)
else ()
add_compile_options(
-Wall
-Wextra
-Wpedantic
-fsanitize=address
-g
)
add_link_options(-fsanitize=address)
endif ()
endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Release")
if (MSVC)
add_compile_options(
/MD
)
else ()
add_compile_options(
-O3
)
endif ()
endif ()
include(cmake/CPM.cmake)
set(FETCHCONTENT_QUIET OFF)
enable_testing()
add_subdirectory(Core)
add_subdirectory(Sandbox)