[Cmake-commits] [cmake-commits] king committed cmMakefileTargetGenerator.cxx 1.115 1.116 cmMakefileTargetGenerator.h 1.26 1.27
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Mar 16 16:22:15 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv6450/Source
Modified Files:
cmMakefileTargetGenerator.cxx cmMakefileTargetGenerator.h
Log Message:
ENH: Factor out makefile progress rule commands
This factors duplicate progress rule code into a common method.
Index: cmMakefileTargetGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C 2 -d -r1.26 -r1.27
*** cmMakefileTargetGenerator.h 15 Oct 2008 14:21:14 -0000 1.26
--- cmMakefileTargetGenerator.h 16 Mar 2009 20:22:13 -0000 1.27
***************
*** 104,107 ****
--- 104,109 ----
bool symbolic = false);
+ void AppendProgress(std::vector<std::string>& commands);
+
// write out the variable that lists the objects for this target
void WriteObjectsVariable(std::string& variableName,
Index: cmMakefileTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileTargetGenerator.cxx,v
retrieving revision 1.115
retrieving revision 1.116
diff -C 2 -d -r1.115 -r1.116
*** cmMakefileTargetGenerator.cxx 27 Feb 2009 17:59:52 -0000 1.115
--- cmMakefileTargetGenerator.cxx 16 Mar 2009 20:22:13 -0000 1.116
***************
*** 581,596 ****
// add in a progress call if needed
! std::string progressDir = this->Makefile->GetHomeOutputDirectory();
! progressDir += cmake::GetCMakeFilesDirectory();
! cmOStringStream progCmd;
! progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
! progCmd << this->LocalGenerator->Convert(progressDir.c_str(),
! cmLocalGenerator::FULL,
! cmLocalGenerator::SHELL);
! this->NumberOfProgressActions++;
! progCmd << " $(CMAKE_PROGRESS_"
! << this->NumberOfProgressActions
! << ")";
! commands.push_back(progCmd.str());
std::string buildEcho = "Building ";
--- 581,585 ----
// add in a progress call if needed
! this->AppendProgress(commands);
std::string buildEcho = "Building ";
***************
*** 1108,1123 ****
{
// add in a progress call if needed
! std::string progressDir = this->Makefile->GetHomeOutputDirectory();
! progressDir += cmake::GetCMakeFilesDirectory();
! cmOStringStream progCmd;
! progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
! progCmd << this->LocalGenerator->Convert(progressDir.c_str(),
! cmLocalGenerator::FULL,
! cmLocalGenerator::SHELL);
! this->NumberOfProgressActions++;
! progCmd << " $(CMAKE_PROGRESS_"
! << this->NumberOfProgressActions
! << ")";
! commands.push_back(progCmd.str());
this->LocalGenerator
->AppendEcho(commands, comment.c_str(),
--- 1097,1101 ----
{
// add in a progress call if needed
! this->AppendProgress(commands);
this->LocalGenerator
->AppendEcho(commands, comment.c_str(),
***************
*** 1220,1223 ****
--- 1198,1217 ----
//----------------------------------------------------------------------------
void
+ cmMakefileTargetGenerator::AppendProgress(std::vector<std::string>& commands)
+ {
+ this->NumberOfProgressActions++;
+ std::string progressDir = this->Makefile->GetHomeOutputDirectory();
+ progressDir += cmake::GetCMakeFilesDirectory();
+ cmOStringStream progCmd;
+ progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report ";
+ progCmd << this->LocalGenerator->Convert(progressDir.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
+ progCmd << " $(CMAKE_PROGRESS_" << this->NumberOfProgressActions << ")";
+ commands.push_back(progCmd.str());
+ }
+
+ //----------------------------------------------------------------------------
+ void
cmMakefileTargetGenerator
::WriteObjectsVariable(std::string& variableName,
More information about the Cmake-commits
mailing list