diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-03-14 16:29:15 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-03-14 16:29:15 (GMT) |
commit | 791aa6052b9033e89645b324b1c99222936981df (patch) | |
tree | fdd95f48321d8074e4c97eaba0b03da3e885d409 /Source/cmGlobalGenerator.cxx | |
parent | f7c024df2a2ae6b8cf5ba127ee764a55f81f06e6 (diff) | |
download | CMake-791aa6052b9033e89645b324b1c99222936981df.zip CMake-791aa6052b9033e89645b324b1c99222936981df.tar.gz CMake-791aa6052b9033e89645b324b1c99222936981df.tar.bz2 |
ENH: add support for out of source source
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 66c5b79..9dc56c8 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -18,6 +18,8 @@ #include "cmLocalGenerator.h" #include "cmake.h" #include "cmMakefile.h" +#include "cmSubDirectory.h" + #include <stdlib.h> // required for atof #if defined(_WIN32) && !defined(__CYGWIN__) @@ -580,32 +582,29 @@ void cmGlobalGenerator::RecursiveConfigure(cmLocalGenerator *lg, lg->Configure(); // get all the subdirectories - std::vector<std::pair<cmStdString, bool> > subdirs = lg->GetMakefile()->GetSubDirectories(); + std::vector<cmSubDirectory> subdirs = + lg->GetMakefile()->GetSubDirectories(); + float progressPiece = (endProgress - startProgress)/(1.0f+subdirs.size()); m_CMakeInstance->UpdateProgress("Configuring", startProgress + progressPiece); // for each subdir recurse - unsigned int i; - for (i = 0; i < subdirs.size(); ++i) + std::vector<cmSubDirectory>::const_iterator sdi = subdirs.begin(); + int i; + for (i = 0; sdi != subdirs.end(); ++sdi, ++i) { cmLocalGenerator *lg2 = this->CreateLocalGenerator(); lg2->SetParent(lg); m_LocalGenerators.push_back(lg2); // add the subdir to the start output directory - std::string outdir = lg->GetMakefile()->GetStartOutputDirectory(); - outdir += "/"; - outdir += subdirs[i].first; - lg2->GetMakefile()->SetStartOutputDirectory(outdir.c_str()); - lg2->SetExcludeAll(!subdirs[i].second); + lg2->GetMakefile()->SetStartOutputDirectory(sdi->BinaryPath.c_str()); + lg2->SetExcludeAll(!sdi->IncludeTopLevel); // add the subdir to the start source directory - std::string currentDir = lg->GetMakefile()->GetStartDirectory(); - currentDir += "/"; - currentDir += subdirs[i].first; - lg2->GetMakefile()->SetStartDirectory(currentDir.c_str()); + lg2->GetMakefile()->SetStartDirectory(sdi->SourcePath.c_str()); lg2->GetMakefile()->MakeStartDirectoriesCurrent(); - + this->RecursiveConfigure(lg2, startProgress + (i+1.0f)*progressPiece, startProgress + (i+2.0f)*progressPiece); |