mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-17 13:22:03 +01:00
Merge 72211802e5313cfeab4019eeaa1727e688a2a7f6 into 5f4422d68dc3530c353af1f87499de1c864b60ad
This commit is contained in:
commit
7f614fa141
@ -94,7 +94,8 @@ option(BUILD_DAEMON "Build bitcoind executable." ON)
|
|||||||
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
|
option(BUILD_GUI "Build bitcoin-qt executable." OFF)
|
||||||
option(BUILD_CLI "Build bitcoin-cli executable." ON)
|
option(BUILD_CLI "Build bitcoin-cli executable." ON)
|
||||||
|
|
||||||
option(BUILD_TESTS "Build test_bitcoin executable." ON)
|
option(BUILD_TESTS "Build tests." ON)
|
||||||
|
option(BUILD_TEST_BINARY "Build test_bitcoin executable." ${BUILD_TESTS})
|
||||||
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
|
option(BUILD_TX "Build bitcoin-tx executable." ${BUILD_TESTS})
|
||||||
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
|
option(BUILD_UTIL "Build bitcoin-util executable." ${BUILD_TESTS})
|
||||||
|
|
||||||
@ -181,7 +182,7 @@ if(BUILD_GUI)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(BUILD_BENCH "Build bench_bitcoin executable." OFF)
|
option(BUILD_BENCH "Build bench_bitcoin executable." OFF)
|
||||||
option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF)
|
option(BUILD_FUZZ_BINARY "Build fuzz executable." OFF)
|
||||||
option(BUILD_FOR_FUZZING "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF)
|
option(BUILD_FOR_FUZZING "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF)
|
||||||
|
|
||||||
option(INSTALL_MAN "Install man pages." ON)
|
option(INSTALL_MAN "Install man pages." ON)
|
||||||
@ -225,6 +226,7 @@ if(BUILD_FOR_FUZZING)
|
|||||||
set(ENABLE_EXTERNAL_SIGNER OFF)
|
set(ENABLE_EXTERNAL_SIGNER OFF)
|
||||||
set(WITH_ZMQ OFF)
|
set(WITH_ZMQ OFF)
|
||||||
set(BUILD_TESTS OFF)
|
set(BUILD_TESTS OFF)
|
||||||
|
set(BUILD_TEST_BINARY OFF)
|
||||||
set(BUILD_GUI_TESTS OFF)
|
set(BUILD_GUI_TESTS OFF)
|
||||||
set(BUILD_BENCH OFF)
|
set(BUILD_BENCH OFF)
|
||||||
set(BUILD_FUZZ_BINARY ON)
|
set(BUILD_FUZZ_BINARY ON)
|
||||||
@ -398,7 +400,7 @@ endif()
|
|||||||
include(AddBoostIfNeeded)
|
include(AddBoostIfNeeded)
|
||||||
add_boost_if_needed()
|
add_boost_if_needed()
|
||||||
|
|
||||||
if(BUILD_DAEMON OR BUILD_GUI OR BUILD_CLI OR BUILD_TESTS OR BUILD_BENCH OR BUILD_FUZZ_BINARY)
|
if(BUILD_DAEMON OR BUILD_GUI OR BUILD_CLI OR BUILD_TEST_BINARY OR BUILD_BENCH OR BUILD_FUZZ_BINARY)
|
||||||
find_package(Libevent 2.1.8 MODULE REQUIRED)
|
find_package(Libevent 2.1.8 MODULE REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -657,11 +659,11 @@ message(" ZeroMQ .............................. ${WITH_ZMQ}")
|
|||||||
message(" USDT tracing ........................ ${WITH_USDT}")
|
message(" USDT tracing ........................ ${WITH_USDT}")
|
||||||
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
|
||||||
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
|
message(" DBus (GUI, Linux only) .............. ${WITH_DBUS}")
|
||||||
message("Tests:")
|
message("Test executables:")
|
||||||
message(" test_bitcoin ........................ ${BUILD_TESTS}")
|
message(" test_bitcoin ........................ ${BUILD_TEST_BINARY}")
|
||||||
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
|
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
|
||||||
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
|
message(" bench_bitcoin ....................... ${BUILD_BENCH}")
|
||||||
message(" fuzz binary ......................... ${BUILD_FUZZ_BINARY}")
|
message(" fuzz ................................ ${BUILD_FUZZ_BINARY}")
|
||||||
message("")
|
message("")
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
set(cross_status "TRUE, for ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_PROCESSOR}")
|
set(cross_status "TRUE, for ${CMAKE_SYSTEM_NAME}, ${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
@ -66,7 +66,7 @@ function(add_boost_if_needed)
|
|||||||
|
|
||||||
# Some package managers, such as vcpkg, vendor Boost.Test separately
|
# Some package managers, such as vcpkg, vendor Boost.Test separately
|
||||||
# from the rest of the headers, so we have to check for it individually.
|
# from the rest of the headers, so we have to check for it individually.
|
||||||
if(BUILD_TESTS AND DEFINED VCPKG_TARGET_TRIPLET)
|
if(BUILD_TEST_BINARY AND DEFINED VCPKG_TARGET_TRIPLET)
|
||||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DBOOST_TEST_NO_MAIN)
|
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DBOOST_TEST_NO_MAIN)
|
||||||
include(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
|
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
|
||||||
|
@ -206,7 +206,7 @@ mkdir -p "$OUTDIR"
|
|||||||
###########################
|
###########################
|
||||||
|
|
||||||
# CONFIGFLAGS
|
# CONFIGFLAGS
|
||||||
CONFIGFLAGS="-DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_FUZZ_BINARY=OFF"
|
CONFIGFLAGS="-DREDUCE_EXPORTS=ON -DBUILD_TESTS=OFF -DBUILD_TEST_BINARY=ON -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF"
|
||||||
|
|
||||||
# CFLAGS
|
# CFLAGS
|
||||||
HOST_CFLAGS="-O2 -g"
|
HOST_CFLAGS="-O2 -g"
|
||||||
|
@ -355,7 +355,7 @@ if(WITH_MULTIPROCESS AND BUILD_DAEMON)
|
|||||||
install_binary_component(bitcoin-node)
|
install_binary_component(bitcoin-node)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_MULTIPROCESS AND BUILD_TESTS)
|
if(WITH_MULTIPROCESS AND BUILD_TEST_BINARY)
|
||||||
# bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
|
# bitcoin_ipc_test library target is defined here in src/CMakeLists.txt
|
||||||
# instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to
|
# instead of src/test/CMakeLists.txt so capnp files in src/test/ are able to
|
||||||
# reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto
|
# reference capnp files in src/ipc/capnp/ by relative path. The Cap'n Proto
|
||||||
@ -459,7 +459,7 @@ if(BUILD_BENCH)
|
|||||||
add_subdirectory(bench)
|
add_subdirectory(bench)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_TESTS)
|
if(BUILD_TEST_BINARY)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user