Skip to content

Commit

Permalink
disable internal testing in benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
jieli-matrix committed Jan 25, 2024
1 parent af5cc0c commit 5d35c57
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -600,17 +600,19 @@ IF (ENABLE_GOOGLEBENCH)
set(BUILD_TESTING ON)
find_package(benchmark HINTS ${BENCHMARK_DIR})
if(NOT ${benchmark_FOUND})
set(BENCHMARK_USE_BUNDLED_GTEST OFF)
include(FetchContent)
FetchContent_Declare(
benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG "origin/main"
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_TESTING=OFF
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(benchmark)
set(BENCHMARK_USE_BUNDLED_GTEST OFF CACHE INTERNAL "disable benchmark bundled gtest")
set(CMAKE_BUILD_TYPE "Release" CACHE INTERNAL "build benchmark in release mode")
set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "disable benchmark testing")
add_subdirectory(tests)
endif()
endif()

Expand Down

0 comments on commit 5d35c57

Please sign in to comment.