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:
@@ -70,6 +70,7 @@ macro(config_compiler_and_linker)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
fix_default_compiler_settings_()
|
fix_default_compiler_settings_()
|
||||||
|
set(cxx_strict_flags "")
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Newlines inside flags variables break CMake's NMake generator.
|
# Newlines inside flags variables break CMake's NMake generator.
|
||||||
# TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
|
# TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
|
||||||
|
|||||||
Reference in New Issue
Block a user