Skip to content

Commit

Permalink
Slight updates to the externals.
Browse files Browse the repository at this point in the history
CMake 3.30.X was taught to configure the code without
warnings. Introduced VECMEM_GOOGLETEST_SOURCE and
VECMEM_BENCHMARK_SOURCE to allow client code to override
the version of these externals used by the project.
Updated the version of GoogleTest to the current latest
one.
  • Loading branch information
krasznaa committed Aug 13, 2024
1 parent 336f154 commit 8bc790d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions benchmarks/googlebenchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@
cmake_minimum_required( VERSION 3.11 )
include( FetchContent )

# Silence FetchContent warnings with CMake >=3.24.
# Silence various FetchContent warnings up to CMake 3.30.X.
if( POLICY CMP0135 )
cmake_policy( SET CMP0135 NEW )
endif()
if( POLICY CMP0169 )
cmake_policy( SET CMP0169 OLD )
endif()

# Tell the user what's happening.
message( STATUS "Building Google Benchmark as part of the VecMem project" )

# Declare where to get googlebenchmark from.
FetchContent_Declare( googlebenchmark
URL "https://github.com/google/benchmark/archive/refs/tags/v1.6.1.tar.gz"
URL_MD5 "8c33c51f9b7154e6c290df3750081c87" )
set( VECMEM_BENCHMARK_SOURCE
"URL;https://github.com/google/benchmark/archive/refs/tags/v1.6.1.tar.gz;URL_MD5;8c33c51f9b7154e6c290df3750081c87"
CACHE STRING "Source for GoogleBenchmark, when built as part of VecMem" )
mark_as_advanced( VECMEM_BENCHMARK_SOURCE )
FetchContent_Declare( googlebenchmark ${VECMEM_BENCHMARK_SOURCE} )

# Option(s) used in the build of Google Benchmark.
set( BENCHMARK_ENABLE_TESTING OFF CACHE BOOL
Expand Down
13 changes: 9 additions & 4 deletions tests/googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@
cmake_minimum_required( VERSION 3.11 )
include( FetchContent )

# Silence FetchContent warnings with CMake >=3.24.
# Silence various FetchContent warnings up to CMake 3.30.X.
if( POLICY CMP0135 )
cmake_policy( SET CMP0135 NEW )
endif()
if( POLICY CMP0169 )
cmake_policy( SET CMP0169 OLD )
endif()

# Tell the user what's happening.
message( STATUS "Building GoogleTest as part of the VecMem project" )

# Declare where to get GoogleTest from.
FetchContent_Declare( GoogleTest
URL "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz"
URL_MD5 "c8340a482851ef6a3fe618a082304cfc" )
set( VECMEM_GOOGLETEST_SOURCE
"URL;https://github.com/google/googletest/archive/refs/tags/v1.15.2.tar.gz;URL_MD5;7e11f6cfcf6498324ac82d567dcb891e"
CACHE STRING "Source for GoogleTest, when built as part of VecMem" )
mark_as_advanced( VECMEM_GOOGLETEST_SOURCE )
FetchContent_Declare( GoogleTest ${VECMEM_GOOGLETEST_SOURCE} )

# Options used in the build of GoogleTest.
set( BUILD_GMOCK FALSE CACHE BOOL "Turn off the build of GMock" )
Expand Down

0 comments on commit 8bc790d

Please sign in to comment.