Skip to content

Commit 8532fcb

Browse files
ryanofskyhebasto
andcommitted
cmake: Fix ctest mptest "Unable to find executable" errors
This change is technically not needed to add libmultiprocess as a subtree, but it avoids a CI failure in followup PR #30975 which enables multiprocess build option in more CI jobs. In that PR, several jobs fail due to the mptest executable not being built by default, as reported bitcoin/bitcoin#30975 (comment) Co-authored-by: Hennadii Stepanov <[email protected]>
1 parent d597ab1 commit 8532fcb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ option(BUILD_DAEMON "Build bitcoind executable." ON)
9494
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
9595
option(BUILD_CLI "Build bitcoin-cli executable." ON)
9696

97-
option(BUILD_TESTS "Build test_bitcoin executable." ON)
97+
option(BUILD_TESTS "Build test_bitcoin and other unit test executables." ON)
9898
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
9999
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
100100

cmake/libmultiprocess.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ function(add_libmultiprocess subdir)
2525
mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION)
2626
mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION)
2727
mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION)
28+
if(BUILD_TESTS)
29+
# Add tests to "all" target so ctest can run them
30+
set_target_properties(mptests PROPERTIES EXCLUDE_FROM_ALL OFF)
31+
endif()
2832
endfunction()

0 commit comments

Comments
 (0)