Skip to content

Commit

Permalink
fixup! cmake: Build test_bitcoin executable
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Oct 19, 2023
1 parent 3458319 commit 8b53050
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ generate_header_from_raw(data/asmap.raw)

add_executable(test_bitcoin
main.cpp
$<TARGET_OBJECTS:bitcoin_consensus>
${CMAKE_CURRENT_BINARY_DIR}/data/asmap.raw.h
${CMAKE_CURRENT_BINARY_DIR}/data/base58_encode_decode.json.h
${CMAKE_CURRENT_BINARY_DIR}/data/bip341_wallet_vectors.json.h
Expand Down Expand Up @@ -134,26 +133,12 @@ add_executable(test_bitcoin
xoroshiro128plusplus_tests.cpp
)

target_link_libraries(test_bitcoin
core
test_util
bitcoin_cli
bitcoin_node
bitcoin_common
bitcoin_util
minisketch
leveldb
univalue
Boost::headers
libevent::libevent
)

if(ENABLE_WALLET)
target_sources(test_bitcoin
PRIVATE
../wallet/test/init_test_fixture.cpp
../wallet/test/wallet_test_fixture.cpp

# Tests:
../wallet/test/coinselector_tests.cpp
../wallet/test/feebumper_tests.cpp
../wallet/test/group_outputs_tests.cpp
Expand All @@ -169,8 +154,25 @@ if(ENABLE_WALLET)
../wallet/test/walletdb_tests.cpp
../wallet/test/walletload_tests.cpp
)
target_link_libraries(test_bitcoin bitcoin_wallet)
if(USE_BDB)
target_sources(test_bitcoin PRIVATE ../wallet/test/db_tests.cpp)
endif()
endif()

target_link_libraries(test_bitcoin
core
test_util
bitcoin_node
$<TARGET_NAME_IF_EXISTS:bitcoin_wallet>
bitcoin_consensus
bitcoin_common
bitcoin_cli
bitcoin_util
bitcoin_crypto
$<TARGET_NAME_IF_EXISTS:bitcoin_zmq>
univalue
minisketch
leveldb
libevent::libevent
Boost::headers
)

0 comments on commit 8b53050

Please sign in to comment.