-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
37 lines (27 loc) · 1.01 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
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(arbok VERSION 1.0.0)
set (CMAKE_CXX_STANDARD 20)
if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
add_compile_options(-march=core-avx2)
endif()
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-march=native)
add_compile_options(-Wall -Wextra -Wshadow -Wfloat-equal -Wconversion -Wno-sign-compare)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(
-fsanitize=address,undefined
-fno-omit-frame-pointer
-fno-sanitize-recover=all
)
add_link_options(
-fsanitize=address,undefined
-fno-omit-frame-pointer
)
endif()
endif()
#add_compile_options(-g -debug inline-debug-info -DNDEBUG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
enable_testing()
add_subdirectory(source)