diff options
author | Brad King <brad.king@kitware.com> | 2018-04-10 15:32:44 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-10 15:32:56 (GMT) |
commit | 5c10e8f6080dcf5dd66f19bb7753208604b8988c (patch) | |
tree | 294d8f2e0b006422f12beed9b8061ba6d94ece89 /Source/cmMakefile.cxx | |
parent | 9fabee00ca8d3f15a05ac3216b755e27843f2fac (diff) | |
parent | aad360eb3d07fc34048f3065e2d3617fa07f2932 (diff) | |
download | CMake-5c10e8f6080dcf5dd66f19bb7753208604b8988c.zip CMake-5c10e8f6080dcf5dd66f19bb7753208604b8988c.tar.gz CMake-5c10e8f6080dcf5dd66f19bb7753208604b8988c.tar.bz2 |
Merge topic 'fix-crash-trace-exp-uninit-vars'
aad360eb3d Fix crash with --trace-expand --warn-uninitialized together
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1944
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index bbe6cc9..87cfc3b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2703,10 +2703,11 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( if (this->GetCMakeInstance()->GetWarnUninitialized() && !this->VariableInitialized(lookup)) { if (this->CheckSystemVars || - cmSystemTools::IsSubDirectory(filename, - this->GetHomeDirectory()) || - cmSystemTools::IsSubDirectory( - filename, this->GetHomeOutputDirectory())) { + (filename && + (cmSystemTools::IsSubDirectory(filename, + this->GetHomeDirectory()) || + cmSystemTools::IsSubDirectory( + filename, this->GetHomeOutputDirectory())))) { std::ostringstream msg; msg << "uninitialized variable \'" << lookup << "\'"; this->IssueMessage(cmake::AUTHOR_WARNING, msg.str()); |