Skip to content

Commit 46e207d

Browse files
committed
cmake: Link bitcoin_consensus as a library
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.
1 parent b042c4f commit 46e207d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ generate_header_from_raw(data/asmap.raw test::data)
1818
# SOURCES property is processed to gather test suite macros.
1919
add_executable(test_bitcoin
2020
main.cpp
21-
$<TARGET_OBJECTS:bitcoin_consensus>
2221
${CMAKE_CURRENT_BINARY_DIR}/data/asmap.raw.h
2322
${CMAKE_CURRENT_BINARY_DIR}/data/base58_encode_decode.json.h
2423
${CMAKE_CURRENT_BINARY_DIR}/data/bip341_wallet_vectors.json.h
@@ -151,6 +150,7 @@ target_link_libraries(test_bitcoin
151150
test_util
152151
bitcoin_cli
153152
bitcoin_node
153+
bitcoin_consensus
154154
minisketch
155155
secp256k1
156156
Boost::headers

0 commit comments

Comments
 (0)