-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (45 loc) · 1.02 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
cmake_minimum_required(VERSION 3.15)
project(typelist_utils CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Catch2 REQUIRED)
add_executable(typelist_utils test/main.cpp test/test_utils.cpp test/test_sort.cpp)
target_include_directories(typelist_utils PRIVATE include)
target_link_libraries(typelist_utils PRIVATE Catch2::Catch2WithMain)
if(ENABLE_COVERAGE)
target_compile_options(
typelist_utils
PRIVATE
-fprofile-instr-generate
-fcoverage-mapping
-mllvm
-runtime-counter-relocation
)
target_link_options(
typelist_utils
PRIVATE
-fprofile-instr-generate
-fcoverage-mapping
)
endif()
target_compile_options(
typelist_utils
PRIVATE
-Wall
-Wextra
-pedantic
-Werror
)
set(
CTEST_COVERAGE_COMMAND
"llvm-cov"
)
enable_testing()
add_test(
NAME typelist_utils
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin
COMMAND
typelist_utils
)
install(DIRECTORY include/typelist_utils DESTINATION include)