summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-22 17:00:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-06-22 17:00:32 (GMT)
commitec6d6be57d5a032bd7c29bc440c8c8710eb426e8 (patch)
tree81f81c663db6566c53908369a7a2110f3d0f8e6c /Source/cmMakefile.cxx
parent24a08255856e9b3a44b55f2f138ce0b25b785928 (diff)
parent820986edfff97779bb0c84fd9da3b284921c8ae4 (diff)
downloadCMake-ec6d6be57d5a032bd7c29bc440c8c8710eb426e8.zip
CMake-ec6d6be57d5a032bd7c29bc440c8c8710eb426e8.tar.gz
CMake-ec6d6be57d5a032bd7c29bc440c8c8710eb426e8.tar.bz2
Merge topic 'minor-cleanups'
820986ed cmLocalGenerator: Constify GetIncludeDirectories method. b3e2e332 QtAutogen: Get the global generator from the Makefile. 61c0113c cmLocalUnixMakefileGenerator3: Remove unused method. 080489b8 cmMakefile: Use member directly instead of through method. 8bfaadfa cmMakefile: Move IsRoot API from cmLocalGenerator. 217c243d cmake: Update the current snapshot when Resetting. eb05dcd6 cmLocalGenerator: Add IssueMessage method. cfae7fa4 cmMakefile: Use cmOutputConverter instead of cmLocalGenerator. ccf7760f cmOutputConverter: Constify API.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 1d75f81..40c3885 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -105,7 +105,7 @@ public:
++it;
if(it == this->VarStack.rend())
{
- cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent();
+ cmLocalGenerator* plg = mf->LocalGenerator->GetParent();
if(!plg)
{
return false;
@@ -264,8 +264,8 @@ void cmMakefile::IssueMessage(cmake::MessageType t,
if(!this->GetCMakeInstance()->GetIsInTryCompile())
{
- lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
- cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME);
}
lfc.Line = 0;
this->GetCMakeInstance()->IssueMessage(t, text, lfc);
@@ -1620,6 +1620,11 @@ void cmMakefile::PopMacroScope(bool reportError)
this->PopFunctionBlockerBarrier(reportError);
}
+bool cmMakefile::IsRootMakefile() const
+{
+ return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
+}
+
//----------------------------------------------------------------------------
class cmMakefileCurrent
{
@@ -1975,8 +1980,8 @@ void cmMakefile::LogUnused(const char* reason,
lfc.FilePath = path;
lfc.Line = 0;
}
- lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath,
- cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath = converter.Convert(lfc.FilePath, cmOutputConverter::HOME);
if (this->CheckSystemVars ||
cmSystemTools::IsSubDirectory(path,
@@ -2873,8 +2878,9 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
{
std::ostringstream msg;
cmListFileContext lfc;
- lfc.FilePath = this->LocalGenerator
- ->Convert(filename, cmLocalGenerator::HOME);
+ cmOutputConverter converter(this->StateSnapshot);
+ lfc.FilePath =
+ converter.Convert(filename, cmOutputConverter::HOME);
lfc.Line = line;
msg << "uninitialized variable \'" << lookup << "\'";
this->GetCMakeInstance()->IssueMessage(cmake::AUTHOR_WARNING,