summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-14 19:18:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-14 19:26:13 (GMT)
commitce167b546d078d9f699248688ff5f16c7ecf15c7 (patch)
tree91e0c8cea98cb4a18e5c99eab254302ab870fbd5 /Source/cmLocalGenerator.cxx
parent7baef756493caaabc226c39c4a8dad669b883d4d (diff)
downloadCMake-ce167b546d078d9f699248688ff5f16c7ecf15c7.zip
CMake-ce167b546d078d9f699248688ff5f16c7ecf15c7.tar.gz
CMake-ce167b546d078d9f699248688ff5f16c7ecf15c7.tar.bz2
cmMakefile: Handle CMP0014 before configuring the generator.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx44
1 files changed, 7 insertions, 37 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 492ea9d..74362ae 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -192,43 +192,8 @@ void cmLocalGenerator::ReadInputFile()
// Look for the CMakeLists.txt file.
std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory();
currentStart += "/CMakeLists.txt";
- if(cmSystemTools::FileExists(currentStart.c_str(), true))
- {
- this->Makefile->ProcessBuildsystemFile(currentStart.c_str());
- return;
- }
-
- assert(this->Parent);
-
- // The file is missing. Check policy CMP0014.
- cmMakefile* mf = this->Parent->GetMakefile();
- std::ostringstream e;
- e << "The source directory\n"
- << " " << this->StateSnapshot.GetCurrentSourceDirectory() << "\n"
- << "does not contain a CMakeLists.txt file.";
- switch (mf->GetPolicyStatus(cmPolicies::CMP0014))
- {
- case cmPolicies::WARN:
- // Print the warning.
- e << "\n"
- << "CMake does not support this case but it used "
- << "to work accidentally and is being allowed for "
- << "compatibility."
- << "\n"
- << cmPolicies::GetPolicyWarning(cmPolicies::CMP0014);
- mf->IssueMessage(cmake::AUTHOR_WARNING, e.str());
- case cmPolicies::OLD:
- // OLD behavior does not warn.
- return;
- case cmPolicies::REQUIRED_IF_USED:
- case cmPolicies::REQUIRED_ALWAYS:
- e << "\n"
- << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0014);
- case cmPolicies::NEW:
- // NEW behavior prints the error.
- mf->IssueMessage(cmake::FATAL_ERROR, e.str());
- break;
- }
+ assert(cmSystemTools::FileExists(currentStart.c_str(), true));
+ this->Makefile->ProcessBuildsystemFile(currentStart.c_str());
}
void cmLocalGenerator::SetupPathConversions()
@@ -3340,6 +3305,11 @@ bool cmLocalGenerator::IsNMake() const
return this->GlobalGenerator->NMake;
}
+void cmLocalGenerator::SetConfiguredCMP0014(bool configured)
+{
+ this->Configured = configured;
+}
+
//----------------------------------------------------------------------------
std::string
cmLocalGenerator