diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2018-12-13 19:45:17 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-12-29 21:31:09 (GMT) |
commit | cbf0c0fce4dfe23912f7cc012c6f0234a5fd694b (patch) | |
tree | 39a75140d073d822c226a5caa19d4cb0769781bb /Source/cmCommandArgumentParserHelper.cxx | |
parent | 1d32a35c10b384e8eb0dd2ce68c7bd11424409ac (diff) | |
download | CMake-cbf0c0fce4dfe23912f7cc012c6f0234a5fd694b.zip CMake-cbf0c0fce4dfe23912f7cc012c6f0234a5fd694b.tar.gz CMake-cbf0c0fce4dfe23912f7cc012c6f0234a5fd694b.tar.bz2 |
cmake: Enable --warn-uninitialized inside string(CONFIGURE) and configure_file
Fixes: #18489
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index f94dc24..ca29967 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -92,9 +92,11 @@ const char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) return this->AddString(ostr.str()); } const char* value = this->Makefile->GetDefinition(var); - if (!value && !this->RemoveEmpty) { + if (!value) { this->Makefile->MaybeWarnUninitialized(var, this->FileName); - return nullptr; + if (!this->RemoveEmpty) { + return nullptr; + } } if (this->EscapeQuotes && value) { return this->AddString(cmSystemTools::EscapeQuotes(value)); |