Skip to content

Commit

Permalink
Explicitly set the CMP0135 policy.
Browse files Browse the repository at this point in the history
This is necessary to silence a warning with CMake >=3.24 coming
from FetchContent/ExternalProject.
  • Loading branch information
krasznaa committed Sep 14, 2022
1 parent b2b92ed commit 6d09ba9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions benchmarks/googlebenchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
cmake_minimum_required( VERSION 3.11 )
include( FetchContent )

# Silence FetchContent warnings with CMake >=3.24.
if( POLICY CMP0135 )
cmake_policy( SET CMP0135 NEW )
endif()

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

Expand Down
7 changes: 6 additions & 1 deletion tests/googletest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# VecMem project, part of the ACTS project (R&D line)
#
# (c) 2021 CERN for the benefit of the ACTS project
# (c) 2021-2022 CERN for the benefit of the ACTS project
#
# Mozilla Public License Version 2.0

# CMake include(s).
cmake_minimum_required( VERSION 3.11 )
include( FetchContent )

# Silence FetchContent warnings with CMake >=3.24.
if( POLICY CMP0135 )
cmake_policy( SET CMP0135 NEW )
endif()

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

Expand Down

0 comments on commit 6d09ba9

Please sign in to comment.