-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
97 lines (83 loc) · 2.69 KB
/
CMakeLists.txt
File metadata and controls
97 lines (83 loc) · 2.69 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
cmake_minimum_required(VERSION 3.20)
# This project version will appear in the Doxygen page generated by CMake
project(CppProjectSample
VERSION 1.2.3
LANGUAGES CXX
)
find_package(Doxygen REQUIRED dot)
# https://gitlab.irit.fr/storm/repos/radium/librendering/-/blob/master/doc/CMakeLists.txt
find_file (PLANTUML_JARFILE
NAMES plantuml.jar
PATH_SUFFIXES PlantUML plantuml Plantuml
PATHS /usr/share/ /usr/local/share/ /usr/local/bin /opt/local/share/java/ c/Program\ Files*
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(plantuml DEFAULT_MSG PLANTUML_JARFILE)
set(DOXYGEN_PROJECT_NAME "C++ Document Example")
set(DOXYGEN_PROJECT_BRIEF "Simple example about how to create C++ project documentation with Doxygen")
set(DOXYGEN_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/cmake_generated)
set(DOXYGEN_DISTRIBUTE_GROUP_DOC YES)
set(DOXYGEN_EXTRACT_PRIVATE YES)
set(DOXYGEN_EXTRACT_PRIV_VIRTUAL YES)
set(DOXYGEN_EXTRACT_STATIC YES)
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_GENERATE_LATEX NO)
set(DOXYGEN_RECURSIVE YES)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE README.md)
# Show used smart pointers, STL containers
set(DOXYGEN_HIDE_UNDOC_RELATIONS NO)
# Generate call/caller graph - uses dot
set(DOXYGEN_EXTRACT_ALL YES)
set(DOXYGEN_CALL_GRAPH YES)
set(DOXYGEN_CALLER_GRAPH YES)
set(DOXYGEN_DISABLE_INDEX YES)
set(DOXYGEN_GENERATE_TREEVIEW YES)
# Generate PlantUML diagrams
if (PLANTUML_JARFILE)
set(DOXYGEN_PLANTUML_JAR_PATH ${PLANTUML_JARFILE})
endif ()
doxygen_add_docs(docs_target
${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation"
)
add_executable(
${PROJECT_NAME}
include/element.hpp
include/command.hpp
include/invoker.hpp
include/receiver.hpp
include/single_receiver.hpp
include/container_receiver.hpp
include/create_command.hpp
include/read_command.hpp
include/update_command.hpp
include/delete_command.hpp
src/element.cpp
src/invoker.cpp
src/single_receiver.cpp
src/container_receiver.cpp
src/create_command.cpp
src/read_command.cpp
src/update_command.cpp
src/delete_command.cpp
main.cpp
)
set_target_properties(
${PROJECT_NAME}
PROPERTIES
CXX_STANDARD 23
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO
)
target_compile_options(
${PROJECT_NAME}
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror>
$<$<CXX_COMPILER_ID:Clang>:-Wdocumentation -Wdocumentation-pedantic>
)
target_include_directories(
${PROJECT_NAME}
PUBLIC
include
)