Skip to content

Commit

Permalink
bench: Add initial cmake support
Browse files Browse the repository at this point in the history
  • Loading branch information
aleflm committed Dec 15, 2024
1 parent 069fb90 commit 9ae5f9b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/bench/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) 2023-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.

include(GenerateHeaders)
generate_header_from_raw(data/block413567.raw benchmark::data)

add_executable(bench_firo
bench_bitcoin.cpp
bench.cpp
${CMAKE_CURRENT_BINARY_DIR}/data/block413567.raw.h
# Benchmarks:
base58.cpp
ccoins_caching.cpp
checkblock.cpp
checkqueue.cpp
crypto_hash.cpp
Examples.cpp
lockedpool.cpp
mempool_eviction.cpp
perf.cpp
rollingbloom.cpp
verify_script.cpp
)

target_link_libraries(bench_firo
core_interface
test_util
firo_node
Boost::headers
)

if(ENABLE_WALLET)
target_sources(bench_firo
PRIVATE
coin_selection.cpp
)
target_link_libraries(bench_firo firo_wallet)
endif()

add_test(NAME bench_sanity_check_high_priority
COMMAND bench_firo -sanity-check -priority-level=high
)

install(TARGETS bench_firo
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
1 change: 1 addition & 0 deletions src/bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <map>
#include <string>
#include <limits>

#include <boost/function.hpp>
#include <boost/preprocessor/cat.hpp>
Expand Down

0 comments on commit 9ae5f9b

Please sign in to comment.