diff options
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 234c37e..027a2ba 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -119,10 +119,15 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) cmOStringStream ostr; ostr << this->FileLine; return this->AddString(ostr.str().c_str()); - } + } const char* value = this->Makefile->GetDefinition(var); if(!value && !this->RemoveEmpty) { + if(!this->Makefile->VariableCleared(var)) + { + std::cerr << this->FileName << ":" << this->FileLine << ":" << + " warning: uninitialized variable \'" << var << "\'\n"; + } return 0; } if (this->EscapeQuotes && value) |