-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (37 loc) · 796 Bytes
/
CMakeLists.txt
File metadata and controls
45 lines (37 loc) · 796 Bytes
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
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
PROJECT(Countdown)
ADD_EXECUTABLE(
Countdown
source/main.cpp
)
IF(NOT WIN32)
TARGET_LINK_LIBRARIES(
Countdown
pthread
)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
TARGET_LINK_LIBRARIES(
Countdown
gcov asan
)
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
ENDIF(NOT WIN32)
TARGET_COMPILE_FEATURES(
Countdown
PRIVATE
cxx_relaxed_constexpr
)
SET_PROPERTY(
TARGET Countdown
APPEND_STRING PROPERTY COMPILE_FLAGS
"-Wall -Werror"
)
IF(NOT WIN32)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
SET_PROPERTY(
TARGET Countdown
APPEND_STRING PROPERTY COMPILE_FLAGS
" -fsanitize=address --coverage"
)
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
ENDIF()