From 15535c3f6003032bcebf2a477069c8f1df5bc394 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 23 May 2006 09:58:10 -0400 Subject: [PATCH] BUG: Fix for spaces in path to build directory with new progress stuff. --- Source/cmGlobalUnixMakefileGenerator3.cxx | 19 ++++++++++++++----- Source/cmLocalUnixMakefileGenerator3.cxx | 20 ++++++++++++-------- Source/cmMakefileTargetGenerator.cxx | 9 ++++++--- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 4be48c9a3..805545acb 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -699,11 +699,15 @@ cmGlobalUnixMakefileGenerator3 // Write the rule. commands.clear(); + std::string progressDir = + lg->GetMakefile()->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; cmOStringStream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; - progCmd << lg->GetMakefile()->GetHomeOutputDirectory(); - progCmd << "/CMakeFiles "; - progCmd << + progCmd << lg->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " " << (100*this->GetTargetTotalNumberOfSourceFiles(t->second))/ this->GetNumberOfSourceFiles(); commands.push_back(progCmd.str()); @@ -824,10 +828,15 @@ cmGlobalUnixMakefileGenerator3 localName += "/all"; depends.clear(); + std::string progressDir = + lg->GetMakefile()->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; cmOStringStream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; - progCmd << lg->GetMakefile()->GetHomeOutputDirectory(); - progCmd << "/CMakeFiles "; + progCmd << lg->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " "; std::vector &progFiles = lg->ProgressFiles[t->first]; for (std::vector::iterator i = progFiles.begin(); i != progFiles.end(); ++i) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index e2d3f8925..a4b173903 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1410,12 +1410,14 @@ void cmLocalUnixMakefileGenerator3 if (!this->Parent) { - cmGlobalUnixMakefileGenerator3 *gg = - static_cast(this->GlobalGenerator); + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; cmOStringStream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; - progCmd << this->Makefile->GetHomeOutputDirectory(); - progCmd << "/CMakeFiles 100"; + progCmd << this->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " 100"; commands.push_back(progCmd.str()); } @@ -1426,12 +1428,14 @@ void cmLocalUnixMakefileGenerator3 this->Makefile->GetStartOutputDirectory()); if (!this->Parent) { - cmGlobalUnixMakefileGenerator3 *gg = - static_cast(this->GlobalGenerator); + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; cmOStringStream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; - progCmd << this->Makefile->GetHomeOutputDirectory(); - progCmd << "/CMakeFiles 0"; + progCmd << this->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " 0"; commands.push_back(progCmd.str()); } this->WriteMakeRule(ruleFileStream, "The main all target", "all", diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1f1bf6e33..0c088d48a 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -387,11 +387,14 @@ cmMakefileTargetGenerator int prog = gg->ShouldAddProgressRule(); if (prog) { + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += "/CMakeFiles"; cmOStringStream progCmd; progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; - progCmd << this->Makefile->GetHomeOutputDirectory(); - progCmd << "/CMakeFiles "; - progCmd << prog; + progCmd << this->LocalGenerator->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " " << prog; commands.push_back(progCmd.str()); this->LocalGenerator->ProgressFiles[this->Target->GetName()]. push_back(prog);