mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-26 17:52:13 +01:00
Merge bitcoin/bitcoin#31357: cmake: Improve build script correctness
ab5c63edccea7957e2c7b3b9d8b04655a7f82f22 cmake: Build `secp256k1` only when required (Hennadii Stepanov) 76a3a540a4c3ff42f84c4701cb2ca6e910a24f50 cmake: Ensure script correctness when no targets are specified (Hennadii Stepanov) Pull request description: When no build targets are specified, it is reasonable to expect the configuration step to succeed and produce a build system that does not build any targets. This PR updates the code to ensure this behaviour: ``` $ cmake -B build -G "Ninja" -DBUILD_DAEMON=OFF -DBUILD_CLI=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DENABLE_WALLET=OFF -DBUILD_TESTS=OFF $ cmake --build build ninja: no work to do. ``` ACKs for top commit: TheCharlatan: ACK ab5c63edccea7957e2c7b3b9d8b04655a7f82f22 tdb3: light test ACK ab5c63edccea7957e2c7b3b9d8b04655a7f82f22 Tree-SHA512: 1b13f406c58b02768d9ba831413aeae1d7e03659e7101de8e598f906ba220f479ac06707965c96a14468ce4ba49011a1ab9adee9cee34ab1e8622f690b94dad8
This commit is contained in:
commit
abeebccc48
@ -73,6 +73,9 @@ if(DEFINED ENV{CFLAGS})
|
||||
endif()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
|
||||
add_subdirectory(secp256k1)
|
||||
set_target_properties(secp256k1 PROPERTIES
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
string(APPEND CMAKE_C_COMPILE_OBJECT " ${APPEND_CPPFLAGS} ${APPEND_CFLAGS}")
|
||||
|
||||
@ -296,8 +299,8 @@ target_link_libraries(bitcoin_node
|
||||
minisketch
|
||||
univalue
|
||||
Boost::headers
|
||||
libevent::core
|
||||
libevent::extra
|
||||
$<TARGET_NAME_IF_EXISTS:libevent::core>
|
||||
$<TARGET_NAME_IF_EXISTS:libevent::extra>
|
||||
$<TARGET_NAME_IF_EXISTS:libevent::pthreads>
|
||||
$<TARGET_NAME_IF_EXISTS:USDT::headers>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user