Skip to content

Commit

Permalink
fixup! cmake: Build bench_bitcoin executable
Browse files Browse the repository at this point in the history
1) Drop unneeded dependencies in `test_util`.

2) Adjust dependencies for `bench_bitcoin` (removed uneeded ones and
add `bitcoin_node`, required after step (1).
  • Loading branch information
hebasto committed Nov 9, 2023
1 parent 9a0a914 commit ab9853a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
7 changes: 3 additions & 4 deletions src/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023 The Bitcoin Core developers
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# file COPYING or https://opensource.org/license/mit/.

include(GenerateHeaders)
generate_header_from_raw(data/block413567.raw)
Expand Down Expand Up @@ -52,8 +52,7 @@ add_executable(bench_bitcoin
target_link_libraries(bench_bitcoin
core
test_util
leveldb
univalue
bitcoin_node
Boost::headers
)

Expand Down
21 changes: 6 additions & 15 deletions src/test/util/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2023 The Bitcoin Core developers
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# file COPYING or https://opensource.org/license/mit/.

add_library(test_util STATIC EXCLUDE_FROM_ALL
blockfilter.cpp
Expand All @@ -17,22 +17,13 @@ add_library(test_util STATIC EXCLUDE_FROM_ALL
transaction_utils.cpp
txmempool.cpp
validation.cpp
$<$<BOOL:${ENABLE_WALLET}>:${PROJECT_SOURCE_DIR}/src/wallet/test/util.cpp>
)

target_link_libraries(test_util
PRIVATE
core
bitcoin_common
bitcoin_node
leveldb
univalue
Boost::headers
PUBLIC
univalue
)

if(ENABLE_WALLET)
target_sources(test_util
PRIVATE
../../wallet/test/util.cpp
)
endif()

target_link_libraries(test_util PRIVATE core)

0 comments on commit ab9853a

Please sign in to comment.