From 2ffea09820e66e25ab639c9fc14810fd96ad6213 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Mon, 10 Feb 2025 15:01:05 +0100 Subject: [PATCH] build: disable bitcoin-node if daemon is not built Co-authored-by: Russell Yanofsky --- CMakeLists.txt | 7 ++++++- src/CMakeLists.txt | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0026414154..f53a458d348 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -609,7 +609,12 @@ message("Configure summary") message("=================") message("Executables:") message(" bitcoind ............................ ${BUILD_DAEMON}") -message(" bitcoin-node (multiprocess) ......... ${WITH_MULTIPROCESS}") +if(BUILD_DAEMON AND WITH_MULTIPROCESS) + set(bitcoin_daemon_status ON) +else() + set(bitcoin_daemon_status OFF) +endif() +message(" bitcoin-node (multiprocess) ......... ${bitcoin_daemon_status}") message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}") if(BUILD_GUI AND WITH_MULTIPROCESS) set(bitcoin_gui_status ON) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89fdd855a45..8c42359d2d5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -320,7 +320,7 @@ if(BUILD_DAEMON) ) list(APPEND installable_targets bitcoind) endif() -if(WITH_MULTIPROCESS) +if(WITH_MULTIPROCESS AND BUILD_DAEMON) add_executable(bitcoin-node bitcoind.cpp init/bitcoin-node.cpp @@ -332,8 +332,9 @@ if(WITH_MULTIPROCESS) $ ) list(APPEND installable_targets bitcoin-node) +endif() - if(BUILD_TESTS) +if(WITH_MULTIPROCESS AND BUILD_TESTS) # bitcoin_ipc_test library target is defined here in src/CMakeLists.txt # instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to # reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto @@ -347,7 +348,6 @@ if(WITH_MULTIPROCESS) test/ipc_test.capnp ) add_dependencies(bitcoin_ipc_test bitcoin_ipc_headers) - endif() endif()