mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
CMP0053: Fix double warning on uninitialized variables in -P mode
When `CMP0053` is not set to OLD or NEW then we compute both variants in case we need to warn about a behavior change. Do not allow both code paths to produce an uninitialized variable warning. Fixes: #18552
This commit is contained in:
@@ -2766,7 +2766,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
|
||||
} else {
|
||||
varresult = value;
|
||||
}
|
||||
} else if (!removeEmpty) {
|
||||
} else if (!removeEmpty && !this->SuppressSideEffects) {
|
||||
// check to see if we need to print a warning
|
||||
// if strict mode is on and the variable has
|
||||
// not been "cleared"/initialized with a set(foo ) call
|
||||
|
||||
Reference in New Issue
Block a user