BUG: Fix for spaces in path to build directory with new progress stuff.

This commit is contained in:
Brad King 2006-05-23 09:58:10 -04:00
parent 50d058a3a1
commit 15535c3f60
3 changed files with 32 additions and 16 deletions

View File

@ -699,11 +699,15 @@ cmGlobalUnixMakefileGenerator3
// Write the rule. // Write the rule.
commands.clear(); commands.clear();
std::string progressDir =
lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
progCmd << lg->GetMakefile()->GetHomeOutputDirectory(); progCmd << lg->Convert(progressDir.c_str(),
progCmd << "/CMakeFiles "; cmLocalGenerator::FULL,
progCmd << cmLocalGenerator::SHELL);
progCmd << " " <<
(100*this->GetTargetTotalNumberOfSourceFiles(t->second))/ (100*this->GetTargetTotalNumberOfSourceFiles(t->second))/
this->GetNumberOfSourceFiles(); this->GetNumberOfSourceFiles();
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
@ -824,10 +828,15 @@ cmGlobalUnixMakefileGenerator3
localName += "/all"; localName += "/all";
depends.clear(); depends.clear();
std::string progressDir =
lg->GetMakefile()->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
progCmd << lg->GetMakefile()->GetHomeOutputDirectory(); progCmd << lg->Convert(progressDir.c_str(),
progCmd << "/CMakeFiles "; cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << " ";
std::vector<int> &progFiles = lg->ProgressFiles[t->first]; std::vector<int> &progFiles = lg->ProgressFiles[t->first];
for (std::vector<int>::iterator i = progFiles.begin(); for (std::vector<int>::iterator i = progFiles.begin();
i != progFiles.end(); ++i) i != progFiles.end(); ++i)

View File

@ -1410,12 +1410,14 @@ void cmLocalUnixMakefileGenerator3
if (!this->Parent) if (!this->Parent)
{ {
cmGlobalUnixMakefileGenerator3 *gg = std::string progressDir = this->Makefile->GetHomeOutputDirectory();
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); progressDir += "/CMakeFiles";
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
progCmd << this->Makefile->GetHomeOutputDirectory(); progCmd << this->Convert(progressDir.c_str(),
progCmd << "/CMakeFiles 100"; cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << " 100";
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
@ -1426,12 +1428,14 @@ void cmLocalUnixMakefileGenerator3
this->Makefile->GetStartOutputDirectory()); this->Makefile->GetStartOutputDirectory());
if (!this->Parent) if (!this->Parent)
{ {
cmGlobalUnixMakefileGenerator3 *gg = std::string progressDir = this->Makefile->GetHomeOutputDirectory();
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); progressDir += "/CMakeFiles";
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start ";
progCmd << this->Makefile->GetHomeOutputDirectory(); progCmd << this->Convert(progressDir.c_str(),
progCmd << "/CMakeFiles 0"; cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
progCmd << " 0";
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
this->WriteMakeRule(ruleFileStream, "The main all target", "all", this->WriteMakeRule(ruleFileStream, "The main all target", "all",

View File

@ -387,11 +387,14 @@ cmMakefileTargetGenerator
int prog = gg->ShouldAddProgressRule(); int prog = gg->ShouldAddProgressRule();
if (prog) if (prog)
{ {
std::string progressDir = this->Makefile->GetHomeOutputDirectory();
progressDir += "/CMakeFiles";
cmOStringStream progCmd; cmOStringStream progCmd;
progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
progCmd << this->Makefile->GetHomeOutputDirectory(); progCmd << this->LocalGenerator->Convert(progressDir.c_str(),
progCmd << "/CMakeFiles "; cmLocalGenerator::FULL,
progCmd << prog; cmLocalGenerator::SHELL);
progCmd << " " << prog;
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
this->LocalGenerator->ProgressFiles[this->Target->GetName()]. this->LocalGenerator->ProgressFiles[this->Target->GetName()].
push_back(prog); push_back(prog);