mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-17 08:18:07 -04:00
chore: support benchmarks on Windows
This commit is contained in:
parent
336cce52bf
commit
f125999ffa
@ -751,14 +751,14 @@ endif()
|
||||
|
||||
if(WITH_BENCHMARKS)
|
||||
if(NOT STATIC_BUILD_DO_NOT_USE)
|
||||
pkg_check_modules(BENCHMARK IMPORTED_TARGET benchmark)
|
||||
if(BENCHMARK_FOUND)
|
||||
find_package(benchmark)
|
||||
if(benchmark_FOUND)
|
||||
add_executable(dwarfs_benchmark test/dwarfs_benchmark.cpp)
|
||||
target_link_libraries(dwarfs_benchmark test_helpers PkgConfig::BENCHMARK)
|
||||
target_link_libraries(dwarfs_benchmark test_helpers benchmark::benchmark)
|
||||
list(APPEND BINARY_TARGETS dwarfs_benchmark)
|
||||
|
||||
add_executable(multiversioning_benchmark test/multiversioning_benchmark.cpp)
|
||||
target_link_libraries(multiversioning_benchmark test_helpers PkgConfig::BENCHMARK)
|
||||
target_link_libraries(multiversioning_benchmark test_helpers benchmark::benchmark)
|
||||
list(APPEND BINARY_TARGETS multiversioning_benchmark)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -42,11 +42,10 @@ target_compile_features(ricepp PUBLIC cxx_std_20)
|
||||
# target_link_libraries(ricepp_demo PRIVATE ricepp fmt)
|
||||
|
||||
if(WITH_BENCHMARKS)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(BENCHMARK IMPORTED_TARGET benchmark)
|
||||
if(BENCHMARK_FOUND)
|
||||
find_package(benchmark)
|
||||
if(benchmark_FOUND)
|
||||
add_executable(ricepp_benchmark ricepp_benchmark.cpp)
|
||||
target_link_libraries(ricepp_benchmark ricepp PkgConfig::BENCHMARK)
|
||||
target_link_libraries(ricepp_benchmark ricepp benchmark::benchmark)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"benchmark",
|
||||
"boost-asio",
|
||||
"boost-chrono",
|
||||
"boost-context",
|
||||
|
Loading…
x
Reference in New Issue
Block a user