-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
76 lines (63 loc) · 1.31 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
76
cmake_minimum_required (VERSION 3.15)
project (
nonnull_ptr
VERSION
0.0.5
LANGUAGES
CXX
)
# Options
string (COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" _ENABLE_TESTS_DEFAULT)
option (
GCH_NONNULL_PTR_ENABLE_TESTS
"Set to ON to build tests for gch::nonnull_ptr."
${_ENABLE_TESTS_DEFAULT}
)
if (GCH_NONNULL_PTR_ENABLE_TESTS)
include (CMakeDependentOption)
cmake_dependent_option (
GCH_USE_LIBCXX_WITH_CLANG
"Set to ON to use libc++ when compiling with Clang."
OFF
"CMAKE_CXX_COMPILER_ID MATCHES Clang"
OFF
)
enable_testing ()
endif ()
set (
GCH_NONNULL_PTR_INSTALL_CMAKE_DIR
"lib/cmake/nonnull_ptr"
CACHE STRING
"Specify where to install the CMake config files."
)
set (
GCH_NONNULL_PTR_INSTALL_INCLUDE_DIR
"include"
CACHE STRING
"Specify where to install gch/nonnull_ptr.hpp."
)
set (
GCH_NONNULL_PTR_INSTALL_LICENSE_DIR
"share/licenses/gch/nonnull_ptr"
CACHE STRING
"Specify where to install the license."
)
set (
GCH_NONNULL_PTR_INSTALL_SUPPORT_DIR
"share/gch"
CACHE STRING
"Specify where to install support files like GDB prettyprinters."
)
add_subdirectory (source)
export (
EXPORT
nonnull_ptr-targets
NAMESPACE
gch::
)
install (
FILES
docs/LICENSE
DESTINATION
${GCH_NONNULL_PTR_INSTALL_LICENSE_DIR}
)