-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (37 loc) · 1.15 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
cmake_minimum_required(VERSION 3.14)
include(cmake/prelude.cmake)
project(
safe-containers
VERSION 0.1.0
DESCRIPTION "C++17/20 STL containers with support for fallible allocation"
HOMEPAGE_URL "https://github.com/sadroeck/safe-containers"
LANGUAGES NONE
)
include(cmake/variables.cmake)
# ---- Declare library ----
add_library(safe-containers_safe-containers INTERFACE)
add_library(safe-containers::safe-containers ALIAS safe-containers_safe-containers)
set_property(
TARGET safe-containers_safe-containers PROPERTY
EXPORT_NAME safe-containers
)
target_include_directories(
safe-containers_safe-containers ${warning_guard}
INTERFACE
"\$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
)
target_compile_features(safe-containers_safe-containers INTERFACE cxx_std_17)
# ---- Install rules ----
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()
# ---- Developer mode ----
if(NOT safe-containers_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of safe-containers"
)
endif()
include(cmake/dev-mode.cmake)