-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
53 lines (44 loc) · 1.12 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
cmake_minimum_required(VERSION 3.10)
project(zectl LANGUAGES C VERSION 0.1.5 DESCRIPTION "BE Manager")
set (CMAKE_C_STANDARD 11)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules/")
# Test these when checking for bugs
#add_compile_options(
# -O2
# -pipe
# -fno-plt
# -fexceptions
# -Wp,-D_FORTIFY_SOURCE=3
# -Wformat
# -Werror=format-security
# -fstack-clash-protection
# -fcf-protection
# -fno-omit-frame-pointer
# -mno-omit-leaf-frame-pointer
#)
#
#add_link_options(
# -O2
# -pipe
# -fno-plt
# -fexceptions
# -Wp,-D_FORTIFY_SOURCE=3
# -Wformat
# -Werror=format-security
# -fstack-clash-protection
# -fcf-protection
# -fno-omit-frame-pointer
# -mno-omit-leaf-frame-pointer
#)
include_directories(include)
include(FindZFS)
if (CMAKE_VERSION VERSION_LESS 3.12)
add_definitions(-DDEBUG=0)
else()
add_compile_definitions(DEBUG=0)
endif()
add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(docs)
add_subdirectory(tests)
unset(PLUGINS_DIRECTORY CACHE)