File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
include_guard (GLOBAL )
6
6
7
+ # Functions in this module are drop-in replacements for CMake's add_library
8
+ # and add_executable functions. They are mandatory for use in the Bitcoin
9
+ # Core project, except for imported and interface libraries.
10
+
7
11
function (subtree_add_library name )
12
+ if (NOT name MATCHES "^crc32c|^leveldb|^minisketch|^secp256k1" )
13
+ message (FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} () was called to add a non-subtree target \" ${name} \" ." )
14
+ endif ()
8
15
cmake_parse_arguments (PARSE_ARGV 1 FWD "" "" "" )
9
16
add_library ("${name} " ${FWD_UNPARSED_ARGUMENTS} )
10
17
target_link_libraries ("${name} " PRIVATE core_base_interface )
@@ -17,6 +24,9 @@ function(subtree_add_library name)
17
24
endfunction ()
18
25
19
26
function (bitcoincore_add_library name )
27
+ if (name MATCHES "^crc32c|^leveldb|^minisketch|^secp256k1" )
28
+ message (FATAL_ERROR "${CMAKE_CURRENT_FUNCTION} () was called to add a subtree target \" ${name} \" ." )
29
+ endif ()
20
30
cmake_parse_arguments (PARSE_ARGV 1 FWD "" "" "" )
21
31
add_library ("${name} " ${FWD_UNPARSED_ARGUMENTS} )
22
32
target_link_libraries ("${name} " PRIVATE core_interface )
You can’t perform that action at this time.
0 commit comments