summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-04 13:13:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-06-04 13:13:35 (GMT)
commit0886880e3b8e5510f861b2e573b311c16db9d657 (patch)
treee03b827e93a51589283c08fdd689fd75357ee40b /Source/cmLocalGenerator.cxx
parentd6fe79f3abc211361f0aee909e08fd6a1531a68b (diff)
parent7657e8b1df64ed3b5429be34416e8756b659d525 (diff)
downloadCMake-0886880e3b8e5510f861b2e573b311c16db9d657.zip
CMake-0886880e3b8e5510f861b2e573b311c16db9d657.tar.gz
CMake-0886880e3b8e5510f861b2e573b311c16db9d657.tar.bz2
Merge topic 'cmMakefile-Configure'
7657e8b1 cmMakefile: Introduce a local cmMakefile variable. 4e8f242d cmMakefile: Store unconfigured cmMakefiles. d65e0123 cmMakefile: Implement ConfigureSubDirectory in terms of cmMakefile. f059ed16 cmMakefile: Move Configure responsibility from cmLocalGenerator. a653611d cmake: Replace CurrentLocalGenerator concept with CurrentMakefile. 69a038a9 cmMakefile: Refactor directories specified with the subdirs command. 08637970 cmLocalGenerator: ComputeObjectMaxPath just before generating. 27e11c6f Merge Configure state with GeneratingBuildSystem state. 363caa2f cmLocalGenerator: De-virtualize Configure().
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx74
1 files changed, 1 insertions, 73 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 1812f1b..da95a4d 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -59,7 +59,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
this->Makefile = new cmMakefile(this);
this->LinkScriptShell = false;
- this->Configured = false;
this->EmitUniversalBinaryFlags = true;
this->BackwardsCompatibility = 0;
this->BackwardsCompatibilityFinal = false;
@@ -76,72 +75,6 @@ bool cmLocalGenerator::IsRootMakefile() const
}
//----------------------------------------------------------------------------
-class cmLocalGeneratorCurrent
-{
- cmGlobalGenerator* GG;
- cmLocalGenerator* LG;
- cmState::Snapshot Snapshot;
-public:
- cmLocalGeneratorCurrent(cmLocalGenerator* lg)
- {
- this->GG = lg->GetGlobalGenerator();
- this->LG = this->GG->GetCurrentLocalGenerator();
- this->Snapshot = this->GG->GetCMakeInstance()->GetCurrentSnapshot();
- this->GG->GetCMakeInstance()->SetCurrentSnapshot(lg->GetStateSnapshot());
- this->GG->SetCurrentLocalGenerator(lg);
-#if defined(CMAKE_BUILD_WITH_CMAKE)
- this->GG->GetFileLockPool().PushFileScope();
-#endif
- }
- ~cmLocalGeneratorCurrent()
- {
-#if defined(CMAKE_BUILD_WITH_CMAKE)
- this->GG->GetFileLockPool().PopFileScope();
-#endif
- this->GG->SetCurrentLocalGenerator(this->LG);
- this->GG->GetCMakeInstance()->SetCurrentSnapshot(this->Snapshot);
- }
-};
-
-//----------------------------------------------------------------------------
-void cmLocalGenerator::Configure()
-{
- // Manage the global generator's current local generator.
- cmLocalGeneratorCurrent clg(this);
- static_cast<void>(clg);
-
- // make sure the CMakeFiles dir is there
- std::string filesDir = this->StateSnapshot.GetCurrentBinaryDirectory();
- filesDir += cmake::GetCMakeFilesDirectory();
- cmSystemTools::MakeDirectory(filesDir.c_str());
-
- std::string currentStart = this->StateSnapshot.GetCurrentSourceDirectory();
- currentStart += "/CMakeLists.txt";
- assert(cmSystemTools::FileExists(currentStart.c_str(), true));
- this->Makefile->ProcessBuildsystemFile(currentStart.c_str());
-
- // at the end of the ReadListFile handle any old style subdirs
- // first get all the subdirectories
- std::vector<cmLocalGenerator *> subdirs = this->GetChildren();
-
- // for each subdir recurse
- std::vector<cmLocalGenerator *>::iterator sdi = subdirs.begin();
- for (; sdi != subdirs.end(); ++sdi)
- {
- if (!(*sdi)->Configured)
- {
- this->Makefile->ConfigureSubDirectory(*sdi);
- }
- }
-
- this->Makefile->AddCMakeDependFilesFromUser();
-
- this->ComputeObjectMaxPath();
-
- this->Configured = true;
-}
-
-//----------------------------------------------------------------------------
void cmLocalGenerator::ComputeObjectMaxPath()
{
// Choose a maximum object file name length.
@@ -3179,11 +3112,6 @@ bool cmLocalGenerator::IsNMake() const
return this->GetState()->UseNMake();
}
-void cmLocalGenerator::SetConfiguredCMP0014(bool configured)
-{
- this->Configured = configured;
-}
-
//----------------------------------------------------------------------------
std::string
cmLocalGenerator
@@ -3465,7 +3393,7 @@ cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
}
}
this->BackwardsCompatibility = CMake_VERSION_ENCODE(major, minor, patch);
- this->BackwardsCompatibilityFinal = this->Configured;
+ this->BackwardsCompatibilityFinal = this->Makefile->IsConfigured();
}
return this->BackwardsCompatibility;