Skip to content

Commit b1b4977

Browse files
committed
cmake: Make BUILD_<util> defaults dependent on BUILD_TESTS
1 parent 9f55197 commit b1b4977

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ include(CMakeDependentOption)
6565
option(BUILD_DAEMON "Build bitcoind executable." ON)
6666
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
6767
option(BUILD_CLI "Build bitcoin-cli executable." ON)
68-
option(BUILD_TX "Build bitcoin-tx executable." ON)
69-
option(BUILD_UTIL "Build bitcoin-util executable." ON)
68+
69+
option(BUILD_TESTS "Build test_bitcoin executable." ON)
70+
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
71+
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
72+
7073
option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable." OFF)
7174
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
7275

@@ -99,7 +102,7 @@ if(WITH_BDB)
99102
endif()
100103
endif()
101104
endif()
102-
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ON "ENABLE_WALLET" OFF)
105+
cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF)
103106

104107
option(ENABLE_THREADLOCAL "Enable features that depend on the C++ thread_local keyword (currently just thread names in debug logs)." ON)
105108
option(ENABLE_HARDENING "Attempt to harden the resulting executables." ON)
@@ -160,7 +163,6 @@ if(WITH_MULTIPROCESS)
160163
find_package(LibmultiprocessGen CONFIG REQUIRED)
161164
endif()
162165

163-
option(BUILD_TESTS "Build test_bitcoin executable." ON)
164166
cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
165167
option(BUILD_BENCH "Build bench_bitcoin executable." OFF)
166168
option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF)

0 commit comments

Comments
 (0)