diff --git a/CMakeLists.txt b/CMakeLists.txt index 26a356866095c..2a57c8a58d69c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,11 @@ include(CMakeDependentOption) option(BUILD_DAEMON "Build bitcoind executable." ON) option(BUILD_GUI "Build bitcoin-qt executable." OFF) option(BUILD_CLI "Build bitcoin-cli executable." ON) -option(BUILD_TX "Build bitcoin-tx executable." ON) -option(BUILD_UTIL "Build bitcoin-util executable." ON) + +option(BUILD_TESTS "Build test_bitcoin executable." ON) +option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS}) +option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS}) + option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable." OFF) option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE}) @@ -99,7 +102,7 @@ if(WITH_BDB) endif() endif() endif() -cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ON "ENABLE_WALLET" OFF) +cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF) option(THREADLOCAL "Enable features that depend on the C++ thread_local keyword (currently just thread names in debug logs)." ON) option(HARDENING "Attempt to harden the resulting executables." ON) @@ -161,7 +164,6 @@ if(MULTIPROCESS) find_package(LibmultiprocessGen CONFIG REQUIRED) endif() -option(BUILD_TESTS "Build test_bitcoin executable." ON) cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF) option(BUILD_BENCH "Build bench_bitcoin executable." OFF) option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF)