From 8bb75384542fb1fb71f218113102ff667f49b836 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 9 May 2024 20:36:06 +0100 Subject: [PATCH] cmake: Make `BUILD_` defaults dependent on `BUILD_TESTS` --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)