Skip to content

Commit

Permalink
cmake: Link bitcoin_consensus as a library
Browse files Browse the repository at this point in the history
The TARGET_OBJECTS generator expression was introduced in the staging
branch when we aimed to build the libbitcoinconsensus shared library.
However, `bitcoin_consensus` is a STATIC library, not an OBJECT library.

This change updates the build system to link `bitcoin_consensus`
normally to `test_bitcoin`, resolving linking issues when building with
clang-cl.
  • Loading branch information
hebasto committed Dec 15, 2024
1 parent b042c4f commit 46e207d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ generate_header_from_raw(data/asmap.raw test::data)
# SOURCES property is processed to gather test suite macros.
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 @@ -151,6 +150,7 @@ target_link_libraries(test_bitcoin
test_util
bitcoin_cli
bitcoin_node
bitcoin_consensus
minisketch
secp256k1
Boost::headers
Expand Down

0 comments on commit 46e207d

Please sign in to comment.