Ver Fonte

Merge branch 'googletest_policy_settings' into release-3.12

Merge-request: !2237
Brad King há 7 anos atrás
pai
commit
8442d9fc3f
1 ficheiros alterados com 7 adições e 0 exclusões
  1. 7 0
      Modules/GoogleTest.cmake

+ 7 - 0
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)