Skip to content

Commit 952a18d

Browse files
committed
build: disable bitcoin-mine in fuzzer build
1 parent ef0204c commit 952a18d

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
150150
)
151151
endif()
152152

153+
option(BUILD_MINE "Build experimental bitcoin-mine executable." ${ENABLE_IPC})
154+
153155
cmake_dependent_option(WITH_SV2 "Enable Stratum v2 functionality." ON "NOT WIN32" OFF)
154156
cmake_dependent_option(BUILD_IPC_TESTS "Build IPC test executables." ON "ENABLE_IPC;BUILD_TESTS" OFF)
155157

@@ -219,6 +221,7 @@ if(BUILD_FOR_FUZZING)
219221
set(BUILD_TX OFF)
220222
set(BUILD_UTIL OFF)
221223
set(BUILD_UTIL_CHAINSTATE OFF)
224+
set(BUILD_MINE OFF)
222225
set(BUILD_KERNEL_LIB OFF)
223226
set(BUILD_WALLET_TOOL OFF)
224227
set(BUILD_GUI OFF)
@@ -645,6 +648,12 @@ message(" USDT tracing ........................ ${WITH_USDT}")
645648
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
646649
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
647650
message(" Stratum v2 .......................... ${WITH_SV2}")
651+
if(BUILD_MINE AND ENABLE_IPC)
652+
set(bitcoin_mine_status ON)
653+
else()
654+
set(bitcoin_mine_status OFF)
655+
endif()
656+
message(" bitcoin-mine (multiprocess) ......... ${bitcoin_mine_status}")
648657
message("Tests:")
649658
message(" test_bitcoin ........................ ${BUILD_TESTS}")
650659
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")

src/CMakeLists.txt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@ if(WITH_SV2)
3636
add_subdirectory(sv2)
3737

3838
# TOOD: move into sv2 directory
39-
add_executable(bitcoin-mine
40-
bitcoin-mine.cpp
41-
init/bitcoin-mine.cpp
42-
)
43-
target_link_libraries(bitcoin-mine
44-
core_interface
45-
bitcoin_common
46-
bitcoin_sv2
47-
bitcoin_ipc
48-
)
49-
list(APPEND installable_targets bitcoin-mine)
39+
if(BUILD_MINE)
40+
add_executable(bitcoin-mine
41+
bitcoin-mine.cpp
42+
init/bitcoin-mine.cpp
43+
)
44+
target_link_libraries(bitcoin-mine
45+
core_interface
46+
bitcoin_common
47+
bitcoin_sv2
48+
bitcoin_ipc
49+
)
50+
list(APPEND installable_targets bitcoin-mine)
51+
endif()
5052
endif()
5153

5254
#=============================

0 commit comments

Comments
 (0)