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
This commit is contained in:
Manikandan K. S. 2026-07-19 18:34:59 +05:30
parent fa005b296f
commit 51109ebb47

View File

@ -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.