summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7c74a0f..f09c8cb 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -519,8 +519,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 +621,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;
}