@@ -7,6 +7,10 @@ cmake_minimum_required(VERSION 3.25...3.31)
7
7
8
8
project(beman_execution26 VERSION 0.0.1 LANGUAGES CXX)
9
9
10
+ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
11
+ message(FATAL_ERROR "In-source builds are not allowed!")
12
+ endif()
13
+
10
14
set(TARGET_NAME execution26)
11
15
set(TARGET_NAMESPACE beman) # FIXME : not used in install(EXPORT ...) CK?
12
16
set(TARGET_PREFIX ${TARGET_NAMESPACE}.${TARGET_NAME})
@@ -15,13 +19,58 @@ set(TARGET_ALIAS ${TARGET_LIBRARY}::${TARGET_LIBRARY})
15
19
set(TARGET_PACKAGE_NAME ${PROJECT_NAME}-config)
16
20
set(TARGETS_EXPORT_NAME ${PROJECT_NAME}-targets)
17
21
18
- if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
19
- message(FATAL_ERROR "In-source builds are not allowed!")
20
- endif()
21
-
22
22
include (GNUInstallDirs)
23
23
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
24
24
25
+ if(CMAKE_BUILD_TYPE STREQUAL Debug)
26
+ include (FetchContent)
27
+
28
+ # Add project_options from https://github.com/aminya/project_options
29
+ # Change the version in the following URL to update the package
30
+ # (watch the releases of the repository for future updates)
31
+ set(PROJECT_OPTIONS_VERSION "v0.41.0")
32
+ FetchContent_Declare(
33
+ _project_options URL https ://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip
34
+ )
35
+ FetchContent_MakeAvailable(_project_options)
36
+ include (${_project_options_SOURCE_DIR}/Index.cmake)
37
+
38
+ # Initialize project_options variable related to this project
39
+ # This overwrites `project_options` and sets `project_warnings`
40
+ # uncomment to enable the options. Some of them accept one or more inputs:
41
+ project_options(
42
+ PREFIX
43
+ ${PROJECT_NAME}
44
+ ENABLE_CACHE
45
+ # NO! # ENABLE_CLANG_TIDY
46
+ # NO! ENABLE_VS_ANALYSIS
47
+ # ENABLE_INTERPROCEDURAL_OPTIMIZATION
48
+ # ENABLE_NATIVE_OPTIMIZATION
49
+ # ENABLE_DOXYGEN
50
+ # ENABLE_COVERAGE
51
+ ENABLE_SANITIZER_ADDRESS
52
+ ENABLE_SANITIZER_UNDEFINED
53
+ # TODO: ENABLE_SANITIZER_THREAD
54
+ # FIXME: on Linux only with clang++? ENABLE_SANITIZER_MEMORY
55
+ ENABLE_SANITIZER_POINTER_COMPARE
56
+ ENABLE_SANITIZER_POINTER_SUBTRACT
57
+ ENABLE_CONTROL_FLOW_PROTECTION
58
+ ENABLE_STACK_PROTECTION
59
+ ENABLE_OVERFLOW_PROTECTION
60
+ # ENABLE_ELF_PROTECTION
61
+ # ENABLE_RUNTIME_SYMBOLS_RESOLUTION
62
+ # ENABLE_COMPILE_COMMANDS_SYMLINK
63
+ # ENABLE_PCH
64
+ # PCH_HEADERS
65
+ # WARNINGS_AS_ERRORS
66
+ # ENABLE_INCLUDE_WHAT_YOU_USE
67
+ # ENABLE_GCC_ANALYZER
68
+ # ENABLE_BUILD_WITH_TIME_TRACE
69
+ # TODO: buggy! ENABLE_UNITY
70
+ # LINKER "lld"
71
+ )
72
+ endif()
73
+
25
74
add_subdirectory(src/beman/execution26)
26
75
27
76
if(PROJECT_IS_TOP_LEVEL)
@@ -50,4 +99,5 @@ install(
50
99
DESTINATION ${INSTALL_CONFIGDIR}
51
100
)
52
101
102
+ set(CPACK_GENERATOR TGZ)
53
103
include (CPack)
0 commit comments