summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-26 19:14:20 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-26 19:14:20 (GMT)
commitc751d2ebff5b95b0f00c09ef6203d70f323c8144 (patch)
treed52b04bd774d9d6d4ba27ec633249f52c7253f52 /Source/cmGlobalGenerator.cxx
parent85896b3460f3e1276dec6ad67d63df26e65d16e2 (diff)
downloadCMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.zip
CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.gz
CMake-c751d2ebff5b95b0f00c09ef6203d70f323c8144.tar.bz2
added progress
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index bc69b82..eec9999 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -69,23 +69,31 @@ void cmGlobalGenerator::Configure()
lg->GetMakefile()->MakeStartDirectoriesCurrent();
// now do it
- this->RecursiveConfigure(lg);
+ this->RecursiveConfigure(lg,0.0f,0.9f);
// after it is all done do a ConfigureFinalPass
for (i = 0; i < m_LocalGenerators.size(); ++i)
{
m_LocalGenerators[i]->ConfigureFinalPass();
+ m_CMakeInstance->UpdateProgress("Configuring",
+ 0.9f+0.1f*(i+1.0f)/m_LocalGenerators.size());
}
+ m_CMakeInstance->UpdateProgress("Configuring done", -1);
}
// loop through the directories creating cmLocalGenerators and Configure()
-void cmGlobalGenerator::RecursiveConfigure(cmLocalGenerator *lg)
+void cmGlobalGenerator::RecursiveConfigure(cmLocalGenerator *lg,
+ float startProgress,
+ float endProgress)
{
// configure the current directory
lg->Configure();
-
+
// get all the subdirectories
std::vector<std::string> 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;
@@ -107,7 +115,9 @@ void cmGlobalGenerator::RecursiveConfigure(cmLocalGenerator *lg)
lg2->GetMakefile()->SetStartDirectory(currentDir.c_str());
lg2->GetMakefile()->MakeStartDirectoriesCurrent();
- this->RecursiveConfigure(lg2);
+ this->RecursiveConfigure(lg2,
+ startProgress + (i+1.0f)*progressPiece,
+ startProgress + (i+2.0f)*progressPiece);
}
}
@@ -118,6 +128,8 @@ void cmGlobalGenerator::Generate()
for (i = 0; i < m_LocalGenerators.size(); ++i)
{
m_LocalGenerators[i]->Generate(true);
+ m_CMakeInstance->UpdateProgress("Generating",
+ (i+1.0f)/m_LocalGenerators.size());
}
}