diff --git a/CMakeLists.txt b/CMakeLists.txt index 2881e6de16e..99c36f8621a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,7 @@ 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_TESTS "Build test_bitcoin executable." ON) +option(BUILD_TESTS "Build test_bitcoin and other unit test executables." ON) option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS}) option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS}) diff --git a/cmake/libmultiprocess.cmake b/cmake/libmultiprocess.cmake index 2b8e5e31216..4210c53d69f 100644 --- a/cmake/libmultiprocess.cmake +++ b/cmake/libmultiprocess.cmake @@ -25,4 +25,8 @@ function(add_libmultiprocess subdir) mark_as_advanced(CapnProto_kj_IMPORTED_LOCATION) mark_as_advanced(CapnProto_kj-test_IMPORTED_LOCATION) mark_as_advanced(CapnProto_kj-tls_IMPORTED_LOCATION) + if(BUILD_TESTS) + # Add tests to "all" target so ctest can run them + set_target_properties(mptests PROPERTIES EXCLUDE_FROM_ALL OFF) + endif() endfunction()