Skip to content

Commit

Permalink
build: disable bitcoin-mine in fuzzer build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Feb 11, 2025
1 parent ef0204c commit 952a18d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
)
endif()

option(BUILD_MINE "Build experimental bitcoin-mine executable." ${ENABLE_IPC})

cmake_dependent_option(WITH_SV2 "Enable Stratum v2 functionality." ON "NOT WIN32" OFF)
cmake_dependent_option(BUILD_IPC_TESTS "Build IPC test executables." ON "ENABLE_IPC;BUILD_TESTS" OFF)

Expand Down Expand Up @@ -219,6 +221,7 @@ if(BUILD_FOR_FUZZING)
set(BUILD_TX OFF)
set(BUILD_UTIL OFF)
set(BUILD_UTIL_CHAINSTATE OFF)
set(BUILD_MINE OFF)
set(BUILD_KERNEL_LIB OFF)
set(BUILD_WALLET_TOOL OFF)
set(BUILD_GUI OFF)
Expand Down Expand Up @@ -645,6 +648,12 @@ message(" USDT tracing ........................ ${WITH_USDT}")
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
message(" Stratum v2 .......................... ${WITH_SV2}")
if(BUILD_MINE AND ENABLE_IPC)
set(bitcoin_mine_status ON)
else()
set(bitcoin_mine_status OFF)
endif()
message(" bitcoin-mine (multiprocess) ......... ${bitcoin_mine_status}")
message("Tests:")
message(" test_bitcoin ........................ ${BUILD_TESTS}")
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
Expand Down
24 changes: 13 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,19 @@ if(WITH_SV2)
add_subdirectory(sv2)

# TOOD: move into sv2 directory
add_executable(bitcoin-mine
bitcoin-mine.cpp
init/bitcoin-mine.cpp
)
target_link_libraries(bitcoin-mine
core_interface
bitcoin_common
bitcoin_sv2
bitcoin_ipc
)
list(APPEND installable_targets bitcoin-mine)
if(BUILD_MINE)
add_executable(bitcoin-mine
bitcoin-mine.cpp
init/bitcoin-mine.cpp
)
target_link_libraries(bitcoin-mine
core_interface
bitcoin_common
bitcoin_sv2
bitcoin_ipc
)
list(APPEND installable_targets bitcoin-mine)
endif()
endif()

#=============================
Expand Down

0 comments on commit 952a18d

Please sign in to comment.