|
|
@@ -286,6 +286,20 @@ cmListFileBacktrace cmMakefile::GetBacktrace() const
|
|
|
return backtrace;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
+cmListFileBacktrace
|
|
|
+cmMakefile::GetBacktrace(cmListFileContext const& lfc) const
|
|
|
+{
|
|
|
+ cmListFileBacktrace backtrace(this->GetLocalGenerator());
|
|
|
+ backtrace.Append(lfc);
|
|
|
+ for(CallStackType::const_reverse_iterator i = this->CallStack.rbegin();
|
|
|
+ i != this->CallStack.rend(); ++i)
|
|
|
+ {
|
|
|
+ backtrace.Append(*i->Context);
|
|
|
+ }
|
|
|
+ return backtrace;
|
|
|
+}
|
|
|
+
|
|
|
//----------------------------------------------------------------------------
|
|
|
cmListFileContext cmMakefile::GetExecutionContext() const
|
|
|
{
|
|
|
@@ -519,8 +533,10 @@ bool cmMakefile::ProcessBuildsystemFile(const char* listfile)
|
|
|
{
|
|
|
this->AddDefinition("CMAKE_PARENT_LIST_FILE", listfile);
|
|
|
std::string curSrc = this->GetCurrentSourceDirectory();
|
|
|
- return this->ReadListFile(listfile, true,
|
|
|
- curSrc == this->GetHomeDirectory());
|
|
|
+ bool result = this->ReadListFile(listfile, true,
|
|
|
+ curSrc == this->GetHomeDirectory());
|
|
|
+ this->EnforceDirectoryLevelRules();
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
bool cmMakefile::ReadDependentFile(const char* listfile, bool noPolicyScope)
|
|
|
@@ -619,13 +635,6 @@ bool cmMakefile::ReadListFileInternal(const char* filenametoread,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // If this is the directory-level CMakeLists.txt file then perform
|
|
|
- // some extra checks.
|
|
|
- if(this->ListFileStack.size() == 1)
|
|
|
- {
|
|
|
- this->EnforceDirectoryLevelRules();
|
|
|
- }
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|