-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
75 lines (62 loc) · 1.93 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
cmake_minimum_required(VERSION 3.28)
project(CNS VERSION 0.0.1.4)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(CTest)
add_compile_options(-Wall -Wextra -pedantic -Werror)
# Enable experimental library features for parallel algorithms
# See https://libcxx.llvm.org/UsingLibcxx.html
#add_compile_options(-fexperimental-library)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_compile_options(
-fsanitize=undefined
-fsanitize=address
-fno-omit-frame-pointer
--coverage
)
add_link_options(
-fsanitize=undefined
-fsanitize=address
-fno-omit-frame-pointer
--coverage
)
endif()
# Custom build target that is always out of date (and will always be built)
# that deletes old gcda files. If they are left around, clang may error out
# during build
add_custom_target(
cleanup ALL
COMMAND ${PROJECT_SOURCE_DIR}/coverage_delete_gcda.sh ${PROJECT_SOURCE_DIR}
)
add_subdirectory(src)
add_subdirectory(examples)
add_subdirectory(tests)
find_package(Doxygen REQUIRED doxygen)
set(DOXYGEN_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/docs")
set(DOXYGEN_FILE_PATTERNS *.ixx *.hxx)
set(DOXYGEN_ALPHABETICAL_INDEX YES)
set(DOXYGEN_BUILTIN_STL_SUPPORT YES)
set(DOXYGEN_CASE_SENSE_NAMES NO)
set(DOXYGEN_CLASS_DIAGRAMS YES)
set(DOXYGEN_DISTRIBUTE_GROUP_DOC YES)
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
set(DOXYGEN_HIDE_FRIEND_COMPOUNDS YES)
set(DOXYGEN_HIDE_IN_BODY_DOCS YES)
set(DOXYGEN_HIDE_UNDOC_CLASSES YES)
set(DOXYGEN_HIDE_UNDOC_MEMBERS YES)
set(DOXYGEN_JAVADOC_AUTOBRIEF YES)
set(DOXYGEN_QUIET YES)
set(DOXYGEN_RECURSIVE YES)
set(DOXYGEN_REFERENCED_BY_RELATION YES)
set(DOXYGEN_REFERENCES_RELATION YES)
set(DOXYGEN_SORT_BY_SCOPE_NAME YES)
set(DOXYGEN_SORT_MEMBER_DOCS NO)
set(DOXYGEN_SOURCE_BROWSER YES)
set(DOXYGEN_STRIP_CODE_COMMENTS NO)
doxygen_add_docs(
docs
"${PROJECT_SOURCE_DIR}/src"
ALL
COMMENT "Generate HTML documentation"
)