From 51109ebb47fc6661cffe51d3aacd3753f21f2c3a Mon Sep 17 00:00:00 2001 From: "Manikandan K. S." Date: Sun, 19 Jul 2026 18:34:59 +0530 Subject: [PATCH] fix: initialize cxx_strict_flags before compiler branches cxx_strict_flags was omitted in several compiler conditional blocks (such as MSVC, SunPro, XL, and HP), leading to a CMake developer warning about an uninitialized variable when dev warnings are enabled. Fixes #4071 --- googletest/cmake/internal_utils.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 5429c9d0a..b00135579 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -70,6 +70,7 @@ macro(config_compiler_and_linker) endif() fix_default_compiler_settings_() + set(cxx_strict_flags "") if (MSVC) # Newlines inside flags variables break CMake's NMake generator. # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.