mirror of
https://github.com/mhx/dwarfs.git
synced 2025-08-04 02:06:22 -04:00
build: link ricepp benchmarks/tests against jemalloc if we have it
This commit is contained in:
parent
17f766111a
commit
0cacfc576f
@ -162,10 +162,15 @@ if(WITH_BENCHMARKS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(ricepp_benchmark ricepp_benchmark.cpp)
|
add_executable(ricepp_benchmark ricepp_benchmark.cpp)
|
||||||
target_link_libraries(ricepp_benchmark ricepp benchmark::benchmark)
|
target_link_libraries(ricepp_benchmark PRIVATE ricepp benchmark::benchmark)
|
||||||
|
|
||||||
add_executable(ricepp_benchmark_fits ricepp_benchmark_fits.cpp)
|
add_executable(ricepp_benchmark_fits ricepp_benchmark_fits.cpp)
|
||||||
target_link_libraries(ricepp_benchmark_fits ricepp benchmark::benchmark)
|
target_link_libraries(ricepp_benchmark_fits PRIVATE ricepp benchmark::benchmark)
|
||||||
|
|
||||||
|
if (JEMALLOC_FOUND)
|
||||||
|
target_link_libraries(ricepp_benchmark PRIVATE PkgConfig::JEMALLOC)
|
||||||
|
target_link_libraries(ricepp_benchmark_fits PRIVATE PkgConfig::JEMALLOC)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -192,6 +197,10 @@ if(WITH_TESTS)
|
|||||||
|
|
||||||
target_link_libraries(ricepp_test PRIVATE ricepp gtest gmock gtest_main)
|
target_link_libraries(ricepp_test PRIVATE ricepp gtest gmock gtest_main)
|
||||||
|
|
||||||
|
if (JEMALLOC_FOUND)
|
||||||
|
target_link_libraries(ricepp_test PRIVATE PkgConfig::JEMALLOC)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_COVERAGE)
|
if(ENABLE_COVERAGE)
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||||
foreach(target ricepp ${RICEPP_OBJECT_TARGETS} ricepp_test)
|
foreach(target ricepp ${RICEPP_OBJECT_TARGETS} ricepp_test)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user