GoogleTest: Modernize policies using block() / endblock()

This commit is contained in:
Craig Scott
2024-06-02 18:31:03 +10:00
parent 53f3e5da1e
commit 0aa445bb9c
2 changed files with 4 additions and 4 deletions

View File

@@ -286,8 +286,8 @@ same as the Google Test name (i.e. ``suite.testcase``); see also
#]=======================================================================]
# Save project's policies
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
block(SCOPE_FOR POLICIES)
cmake_policy(VERSION 3.30)
#------------------------------------------------------------------------------
function(gtest_add_tests)
@@ -630,4 +630,4 @@ endfunction()
###############################################################################
# Restore project's policies
cmake_policy(POP)
endblock()

View File

@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
cmake_minimum_required(VERSION ${CMAKE_VERSION})
cmake_minimum_required(VERSION 3.30)
# Overwrite possibly existing ${_CTEST_FILE} with empty file
set(flush_tests_MODE WRITE)