-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
80 lines (62 loc) · 1.96 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
# Copyright (c) 2017 The Bitcoin developers
# Copyright (c) 2017 The DeVault developers
cmake_minimum_required(VERSION 3.12)
project(devault
VERSION 1.2.1
# DESCRIPTION "DeVault is a full node implementation of the DeVault protocol."
# HOMEPAGE_URL "https://www.devault.cc"
)
enable_testing()
# Package information
set(PACKAGE_NAME "DeVault Core")
# Copyright
set(COPYRIGHT_YEAR 2019 - 2020)
# Add path for custom modules
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
)
# Make contrib script accessible.
set(CONTRIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/contrib)
# If ccache is available, then use it.
find_program(CCACHE ccache)
if(CCACHE)
message(STATUS "Using ccache: ${CCACHE}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
endif(CCACHE)
# Default to Release configuration
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING
"Select the configuration for the build" FORCE)
endif()
# Find the python interpreter. This is required for several targets.
find_package(Python3 COMPONENTS Interpreter REQUIRED)
# Add the magic targets `check-*`
add_custom_target(check-all)
add_custom_target(check)
add_custom_target(check-symbols)
add_custom_target(check-security)
include(PackageHelper)
exclude_git_ignored_files_from_source_package()
# Ignore hidden files and directories (starting with a '.')
set_property(GLOBAL APPEND PROPERTY SOURCE_PACKAGE_IGNORE_FILES "/\\\\.")
# If the build is out-of-tree, then the build directory can be ignored.
if(NOT CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
set_property(GLOBAL APPEND PROPERTY SOURCE_PACKAGE_IGNORE_FILES
"${CMAKE_BINARY_DIR}/"
)
endif()
exclude_from_source_package(
# Subdirectories
"depends/"
# Files
"[^.]+[.]md$"
"Dockerfile-doxygen"
)
add_subdirectory(src)
add_subdirectory(test)
#add_subdirectory(contrib)
#add_subdirectory(contrib/devtools)
add_subdirectory(doc)
include(PackageOptions.cmake)