mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-06-03 19:40:40 +02:00

Co-authored-by: Patrick <patrick.sieberer@psi.ch> Co-authored-by: JulianHeymes <julian.heymes@psi.ch> Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch> Co-authored-by: Xiangyu Xie <45243914+xiangyuxie@users.noreply.github.com> Co-authored-by: xiangyu.xie <xiangyu.xie@psi.ch> Co-authored-by: AliceMazzoleni99 <alice.mazzoleni@psi.ch> Co-authored-by: Mazzoleni Alice Francesca <mazzol_a@pc17378.psi.ch> Co-authored-by: siebsi <sieb.patr@gmail.com>
27 lines
739 B
CMake
27 lines
739 B
CMake
|
|
include(FetchContent)
|
|
|
|
|
|
FetchContent_Declare(
|
|
benchmark
|
|
GIT_REPOSITORY https://github.com/google/benchmark.git
|
|
GIT_TAG v1.8.3 # Change to the latest version if needed
|
|
)
|
|
|
|
# Ensure Google Benchmark is built correctly
|
|
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
|
|
|
|
FetchContent_MakeAvailable(benchmark)
|
|
|
|
add_executable(benchmarks)
|
|
|
|
target_sources(benchmarks PRIVATE ndarray_benchmark.cpp calculateeta_benchmark.cpp)
|
|
|
|
# Link Google Benchmark and other necessary libraries
|
|
target_link_libraries(benchmarks PRIVATE benchmark::benchmark aare_core aare_compiler_flags)
|
|
|
|
# Set output properties
|
|
set_target_properties(benchmarks PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
OUTPUT_NAME run_benchmarks
|
|
) |