-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (42 loc) · 1.2 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
cmake_minimum_required(VERSION 3.14)
include(cmake/prelude.cmake)
project(
shared_ptr
VERSION 0.1.1
DESCRIPTION "Shared pointer experiments"
HOMEPAGE_URL "https://example.com/"
LANGUAGES CXX
)
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
include(cmake/CPM.cmake)
# ---- Dependencies ----
find_package(Threads REQUIRED)
# ---- Declare library ----
add_library(shared_ptr_shared_ptr INTERFACE)
add_library(wind::shared_ptr ALIAS shared_ptr_shared_ptr)
set_property(
TARGET shared_ptr_shared_ptr PROPERTY
EXPORT_NAME shared_ptr
)
target_include_directories(
shared_ptr_shared_ptr ${warning_guard}
INTERFACE
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
)
target_compile_features(shared_ptr_shared_ptr INTERFACE cxx_std_20)
target_link_libraries(shared_ptr_shared_ptr INTERFACE Threads::Threads)
# ---- Install rules ----
if(NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif()
# ---- Developer mode ----
if(NOT shared_ptr_DEVELOPER_MODE)
return()
elseif(NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of shared_ptr"
)
endif()
include(cmake/dev-mode.cmake)