diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-30 17:50:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-04 13:06:41 (GMT) |
commit | f059ed165bafff94f9bcd3823e12a8ce1f5ec647 (patch) | |
tree | edd12618c7b9e6f6b94a2d9b7882fbb5e9077768 /Source/cmLocalGenerator.cxx | |
parent | a653611db0d6e23456c5ef90f95e19ea5d70a428 (diff) | |
download | CMake-f059ed165bafff94f9bcd3823e12a8ce1f5ec647.zip CMake-f059ed165bafff94f9bcd3823e12a8ce1f5ec647.tar.gz CMake-f059ed165bafff94f9bcd3823e12a8ce1f5ec647.tar.bz2 |
cmMakefile: Move Configure responsibility from cmLocalGenerator.
The generator should only have a function at generate time.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4b9415b..8fcc2ec 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -75,68 +75,6 @@ bool cmLocalGenerator::IsRootMakefile() const } //---------------------------------------------------------------------------- -class cmLocalGeneratorCurrent -{ - cmGlobalGenerator* GG; - cmMakefile* MF; - cmState::Snapshot Snapshot; -public: - cmLocalGeneratorCurrent(cmMakefile* mf) - { - this->GG = mf->GetGlobalGenerator(); - this->MF = this->GG->GetCurrentMakefile(); - this->Snapshot = this->GG->GetCMakeInstance()->GetCurrentSnapshot(); - this->GG->GetCMakeInstance()->SetCurrentSnapshot( - this->GG->GetCMakeInstance()->GetCurrentSnapshot()); - this->GG->SetCurrentMakefile(mf); -#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->SetCurrentMakefile(this->MF); - this->GG->GetCMakeInstance()->SetCurrentSnapshot(this->Snapshot); - } -}; - -//---------------------------------------------------------------------------- -void cmLocalGenerator::Configure() -{ - // Manage the global generator's current local generator. - cmLocalGeneratorCurrent clg(this->GetMakefile()); - 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 handle any old style subdirs - std::vector<cmLocalGenerator *> subdirs = - this->GetMakefile()->GetUnConfiguredDirectories(); - - // for each subdir recurse - std::vector<cmLocalGenerator *>::iterator sdi = subdirs.begin(); - for (; sdi != subdirs.end(); ++sdi) - { - this->Makefile->ConfigureSubDirectory(*sdi); - } - - this->Makefile->AddCMakeDependFilesFromUser(); - - this->Makefile->SetConfigured(); -} - -//---------------------------------------------------------------------------- void cmLocalGenerator::ComputeObjectMaxPath() { // Choose a maximum object file name length. |