From fe5b7ef71e60072283d57e0417776d05eb4b3e7f Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 17 Feb 2023 23:22:27 -0800 Subject: [PATCH] Set CMP0069 policy to avoid warnings When googletest and googlemock are included as a git submodule and referenced as part of an existing CMake project, multiple warnings are printed out due to not setting a value for the CMP0069 policy. --- googletest/cmake/internal_utils.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 0438bef83d..7b9f0b7fc4 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -16,6 +16,10 @@ if (POLICY CMP0054) cmake_policy(SET CMP0054 NEW) endif (POLICY CMP0054) +if (POLICY CMP0069) + cmake_policy(SET CMP0069 NEW) +endif (POLICY CMP0069) + # Tweaks CMake's default compiler/linker settings to suit Google Test's needs. # # This must be a macro(), as inside a function string() can only