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 44
55include_guard (GLOBAL )
66
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+
711function (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 ()
815 cmake_parse_arguments (PARSE_ARGV 1 FWD "" "" "" )
916 add_library ("${name} " ${FWD_UNPARSED_ARGUMENTS} )
1017 target_link_libraries ("${name} " PRIVATE core_base_interface)
@@ -17,6 +24,9 @@ function(subtree_add_library name)
1724endfunction ()
1825
1926function (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 ()
2030 cmake_parse_arguments (PARSE_ARGV 1 FWD "" "" "" )
2131 add_library ("${name} " ${FWD_UNPARSED_ARGUMENTS} )
2232 target_link_libraries ("${name} " PRIVATE core_interface)
You can’t perform that action at this time.
0 commit comments