From 46e207d3296c1423eff7d5b204fad850e15aaec0 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:37:14 +0000 Subject: [PATCH] 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. --- src/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index ed73e449015..859b9132067 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -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 - $ ${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 @@ -151,6 +150,7 @@ target_link_libraries(test_bitcoin test_util bitcoin_cli bitcoin_node + bitcoin_consensus minisketch secp256k1 Boost::headers