-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
54 lines (44 loc) · 991 Bytes
/
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
cmake_minimum_required(VERSION 3.15)
project(placeholder-name CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(
CMAKE_EXPORT_COMPILE_COMMANDS
ON
)
# Coverage
set(
CTEST_COVERAGE_COMMAND
"llvm-cov"
)
function(target_add_coverage target)
if(ENABLE_COVERAGE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(
${target}
PRIVATE
-fprofile-instr-generate
-fcoverage-mapping
-mllvm
-runtime-counter-relocation
)
target_link_options(
${target}
PRIVATE
-fprofile-instr-generate
-fcoverage-mapping
)
endif()
endfunction()
add_compile_options(
-Wall
-Wextra
-pedantic
-Werror
)
# Setup your project here
# Use target_add_coverage(target) to include target in coverage tests
enable_testing()
# Setup your tests here
#Setup your installation directives here
install(DIRECTORY include/typelist_utils DESTINATION include)