diff options
Diffstat (limited to 'Source/cmCommandArgumentParserHelper.cxx')
| -rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 747b7e4..14e9e56 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" #include "cmMakefile.h" +#include "cmState.h" +#include "cmOutputConverter.h" #include "cmCommandArgumentLexer.h" @@ -90,7 +92,8 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, } if ( strcmp(key, "CACHE") == 0 ) { - if(const char* c = this->Makefile->GetCacheManager()->GetCacheValue(var)) + if(const char* c = this->Makefile->GetState() + ->GetInitializedCacheValue(var)) { if(this->EscapeQuotes) { @@ -137,14 +140,15 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) this->Makefile->GetHomeOutputDirectory())) { std::ostringstream msg; - cmListFileBacktrace bt(this->Makefile->GetLocalGenerator()); cmListFileContext lfc; - lfc.FilePath = this->FileName; + cmOutputConverter converter(this->Makefile->GetStateSnapshot()); + lfc.FilePath = converter.Convert(this->FileName, + cmOutputConverter::HOME); + lfc.Line = this->FileLine; - bt.push_back(lfc); msg << "uninitialized variable \'" << var << "\'"; this->Makefile->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING, - msg.str(), bt); + msg.str(), lfc); } } return 0; |
