diff options
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index bf314bd..ccb4f88 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -101,10 +101,11 @@ const char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) // not been "cleared"/initialized with a set(foo ) call if (this->WarnUninitialized && !this->Makefile->VariableInitialized(var)) { if (this->CheckSystemVars || - cmSystemTools::IsSubDirectory(this->FileName, - this->Makefile->GetHomeDirectory()) || - cmSystemTools::IsSubDirectory( - this->FileName, this->Makefile->GetHomeOutputDirectory())) { + (this->FileName && + (cmSystemTools::IsSubDirectory( + this->FileName, this->Makefile->GetHomeDirectory()) || + cmSystemTools::IsSubDirectory( + this->FileName, this->Makefile->GetHomeOutputDirectory())))) { std::ostringstream msg; msg << "uninitialized variable \'" << var << "\'"; this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str()); |