Skip to content

Commit 2ffea09

Browse files
Sjorsryanofsky
andcommitted
build: disable bitcoin-node if daemon is not built
Co-authored-by: Russell Yanofsky <[email protected]>
1 parent 6a46be7 commit 2ffea09

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,12 @@ message("Configure summary")
609609
message("=================")
610610
message("Executables:")
611611
message(" bitcoind ............................ ${BUILD_DAEMON}")
612-
message(" bitcoin-node (multiprocess) ......... ${WITH_MULTIPROCESS}")
612+
if(BUILD_DAEMON AND WITH_MULTIPROCESS)
613+
set(bitcoin_daemon_status ON)
614+
else()
615+
set(bitcoin_daemon_status OFF)
616+
endif()
617+
message(" bitcoin-node (multiprocess) ......... ${bitcoin_daemon_status}")
613618
message(" bitcoin-qt (GUI) .................... ${BUILD_GUI}")
614619
if(BUILD_GUI AND WITH_MULTIPROCESS)
615620
set(bitcoin_gui_status ON)

src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ if(BUILD_DAEMON)
320320
)
321321
list(APPEND installable_targets bitcoind)
322322
endif()
323-
if(WITH_MULTIPROCESS)
323+
if(WITH_MULTIPROCESS AND BUILD_DAEMON)
324324
add_executable(bitcoin-node
325325
bitcoind.cpp
326326
init/bitcoin-node.cpp
@@ -332,8 +332,9 @@ if(WITH_MULTIPROCESS)
332332
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
333333
)
334334
list(APPEND installable_targets bitcoin-node)
335+
endif()
335336

336-
if(BUILD_TESTS)
337+
if(WITH_MULTIPROCESS AND BUILD_TESTS)
337338
# bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
338339
# instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to
339340
# reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto
@@ -347,7 +348,6 @@ if(WITH_MULTIPROCESS)
347348
test/ipc_test.capnp
348349
)
349350
add_dependencies(bitcoin_ipc_test bitcoin_ipc_headers)
350-
endif()
351351
endif()
352352

353353

0 commit comments

Comments
 (0)