diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:20:10 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:20:10 +0900 |
commit | f58f7a233a9b66287e1a0fad0d149e3202a098b4 (patch) | |
tree | cc0cea82fae3f153df9299b27650e17c58da1125 /Source/cmFindPathCommand.cxx | |
parent | 46f8b5215bbbfcf4bc0caed1daf52b678fd2b976 (diff) | |
download | cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.tar.gz cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.tar.bz2 cmake-f58f7a233a9b66287e1a0fad0d149e3202a098b4.zip |
Imported Upstream version 3.18.0upstream/3.18.0
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r-- | Source/cmFindPathCommand.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 908f0c13c..4bab46976 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -5,6 +5,7 @@ #include "cmsys/Glob.hxx" #include "cmMakefile.h" +#include "cmMessageType.h" #include "cmStateTypes.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -43,14 +44,21 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn) std::string result = this->FindHeader(); if (!result.empty()) { this->Makefile->AddCacheDefinition( - this->VariableName, result.c_str(), this->VariableDocumentation.c_str(), + this->VariableName, result, this->VariableDocumentation.c_str(), (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); return true; } this->Makefile->AddCacheDefinition( - this->VariableName, (this->VariableName + "-NOTFOUND").c_str(), + this->VariableName, this->VariableName + "-NOTFOUND", this->VariableDocumentation.c_str(), (this->IncludeFileInPath) ? cmStateEnums::FILEPATH : cmStateEnums::PATH); + if (this->Required) { + this->Makefile->IssueMessage( + MessageType::FATAL_ERROR, + "Could not find " + this->VariableName + + " using the following files: " + cmJoin(this->Names, ", ")); + cmSystemTools::SetFatalErrorOccured(); + } return true; } |