-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
81 lines (67 loc) · 1.46 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
77
78
79
80
81
cmake_minimum_required (VERSION 3.15)
project (
optional_ref
VERSION
0.3.1
LANGUAGES
CXX
)
string (COMPARE EQUAL "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}" _ENABLE_TESTS_DEFAULT)
option (
GCH_OPTIONAL_REF_ENABLE_TESTS
"Set to ON to enable generation of test targets for gch::optional_ref."
${_ENABLE_TESTS_DEFAULT}
)
option (
GCH_OPTIONAL_REF_ENABLE_DOXYGEN
"Set to ON to enable generation of Doxygen targets for gch::optional_ref."
OFF
)
if (GCH_OPTIONAL_REF_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_OPTIONAL_REF_INSTALL_CMAKE_DIR
"lib/cmake/optional_ref"
CACHE STRING
"Specify where to install the CMake config files."
)
set (
GCH_OPTIONAL_REF_INSTALL_INCLUDE_DIR
"include"
CACHE STRING
"Specify where to install gch/optional_ref.hpp."
)
set (
GCH_OPTIONAL_REF_INSTALL_LICENSE_DIR
"share/licenses/gch/optional_ref"
CACHE STRING
"Specify where to install the license."
)
set (
GCH_OPTIONAL_REF_INSTALL_SUPPORT_DIR
"share/gch"
CACHE STRING
"Specify where to install support files like GDB prettyprinters."
)
add_subdirectory (source)
export (
EXPORT
optional_ref-targets
NAMESPACE
gch::
)
install (
FILES
docs/LICENSE
DESTINATION
${GCH_OPTIONAL_REF_INSTALL_LICENSE_DIR}
)