summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorR2RT <artur.ryt@gmail.com>2018-11-04 22:05:35 (GMT)
committerBrad King <brad.king@kitware.com>2018-11-05 13:31:09 (GMT)
commit53a5aec89998a58dff53946b47426ea692c5ad8d (patch)
tree54f8d52db37d6baefaa734238fd09a40cb281d4e /Source/cmMakefile.cxx
parentf92f93467ecc22419c981f8f5283c81fa9d8eb01 (diff)
downloadCMake-53a5aec89998a58dff53946b47426ea692c5ad8d.zip
CMake-53a5aec89998a58dff53946b47426ea692c5ad8d.tar.gz
CMake-53a5aec89998a58dff53946b47426ea692c5ad8d.tar.bz2
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
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 83139ba..0d42fb0 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -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