Skip to content

Commit df4e46b

Browse files
committed
cmake [KILL 3-STATE]: Switch MULTIPROCESS to boolean w/ default OFF
1 parent 732b4e9 commit df4e46b

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ tristate_option(WITH_EXTERNAL_SIGNER
107107
AUTO
108108
)
109109
tristate_option(WITH_QRENCODE "Enable QR code support." "if libqrencode is found." AUTO)
110-
tristate_option(MULTIPROCESS "Build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." "if libmultiprocess is found." OFF)
110+
111+
option(MULTIPROCESS "Build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental." OFF)
112+
if(MULTIPROCESS)
113+
find_package(Libmultiprocess CONFIG REQUIRED)
114+
find_package(LibmultiprocessGen CONFIG REQUIRED)
115+
endif()
111116

112117
option(BUILD_TESTS "Build test_bitcoin executable." ON)
113118
cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_TESTS" OFF)

cmake/optional.cmake

-12
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,3 @@ if(WITH_GUI AND WITH_QRENCODE)
154154
message(FATAL_ERROR "libqrencode requested, but not found.")
155155
endif()
156156
endif()
157-
158-
if(MULTIPROCESS)
159-
find_package(Libmultiprocess CONFIG)
160-
find_package(LibmultiprocessGen CONFIG)
161-
if(TARGET Libmultiprocess::multiprocess AND TARGET Libmultiprocess::mpgen)
162-
set(MULTIPROCESS ON)
163-
elseif(MULTIPROCESS STREQUAL "AUTO")
164-
set(MULTIPROCESS OFF)
165-
else()
166-
message(FATAL_ERROR "\"-DMULTIPROCESS=ON\" specified, but libmultiprocess library was not found.")
167-
endif()
168-
endif()

depends/toolchain.cmake.in

+4-6
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ else()
163163
endif()
164164

165165
if("@multiprocess@" STREQUAL "1")
166-
if(NOT MULTIPROCESS)
167-
set(MULTIPROCESS ON CACHE STRING "")
168-
endif()
169-
if(NOT LibmultiprocessGen_DIR)
170-
set(LibmultiprocessGen_DIR "${CMAKE_FIND_ROOT_PATH}/native/lib/cmake/LibmultiprocessGen" CACHE PATH "")
171-
endif()
166+
set(MULTIPROCESS ON CACHE BOOL "")
167+
set(LibmultiprocessGen_DIR "${CMAKE_FIND_ROOT_PATH}/native/lib/cmake/LibmultiprocessGen" CACHE PATH "")
168+
else()
169+
set(MULTIPROCESS OFF CACHE BOOL "")
172170
endif()

0 commit comments

Comments
 (0)