polserver/cmake/Benchmark.cmake
turleypol 77637b29f0
removed google-benchmark from repo, download when needed (#860)
increased minimal CMake version since efsw needs this version
2026-01-20 07:57:43 +01:00

17 lines
452 B
CMake

if (ENABLE_BENCHMARK)
message("* benchmark")
include(FetchContent)
set(BENCH_REPO "https://github.com/google/benchmark")
set(BENCH_TAG "v1.9.4")
set(FETCHCONTENT_QUIET OFF)
set(FETCHCONTENT_BASE_DIR ${EXT_DOWNLOAD_DIR})
set(BENCHMARK_ENABLE_TESTING OFF)
FetchContent_Declare(
google-benchmark
GIT_REPOSITORY ${BENCH_REPO}
GIT_TAG ${BENCH_TAG}
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(google-benchmark)
endif()