summaryrefslogtreecommitdiff
path: root/Modules/GoogleTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/GoogleTest.cmake')
-rw-r--r--Modules/GoogleTest.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake
index bfb83e1b4a..2c9ee1180d 100644
--- a/Modules/GoogleTest.cmake
+++ b/Modules/GoogleTest.cmake
@@ -238,6 +238,10 @@ 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
+
#------------------------------------------------------------------------------
function(gtest_add_tests)
@@ -454,3 +458,6 @@ endfunction()
set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT
${CMAKE_CURRENT_LIST_DIR}/GoogleTestAddTests.cmake
)
+
+# Restore project's policies
+cmake_policy(POP)