[cmake-commits] martink committed cmLocalGenerator.cxx 1.255 1.256
cmLocalUnixMakefileGenerator3.cxx 1.234 1.235 cmake.cxx 1.352 1.353
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jan 18 10:25:27 EST 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv16939
Modified Files:
cmLocalGenerator.cxx cmLocalUnixMakefileGenerator3.cxx
cmake.cxx
Log Message:
BUG: fix bugs 5539 (progress going beyond 100% when new files are added) and 5889 (tests are not found in some cases when using add_subdirectory to .. etc)
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -d -r1.255 -r1.256
--- cmLocalGenerator.cxx 18 Jan 2008 00:58:01 -0000 1.255
+++ cmLocalGenerator.cxx 18 Jan 2008 15:25:25 -0000 1.256
@@ -272,22 +272,19 @@
}
if ( this->Children.size())
{
- fout << "SUBDIRS(";
size_t i;
- std::string outDir = this->Makefile->GetStartOutputDirectory();
- outDir += "/";
for(i = 0; i < this->Children.size(); ++i)
{
- std::string binP =
+ fout << "ADD_SUBDIRECTORY(";
+ std::string srcP =
+ this->Children[i]->GetMakefile()->GetStartDirectory();
+ fout << this->Convert(srcP.c_str(),START);
+ fout << " ";
+ std::string outP =
this->Children[i]->GetMakefile()->GetStartOutputDirectory();
- cmSystemTools::ReplaceString(binP, outDir.c_str(), "");
- if ( i > 0 )
- {
- fout << " ";
- }
- fout << binP.c_str();
+ fout << this->Convert(outP.c_str(),START_OUTPUT);
+ fout << ")" << std::endl;
}
- fout << ")" << std::endl << std::endl;;
}
}
Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.352
retrieving revision 1.353
diff -u -d -r1.352 -r1.353
--- cmake.cxx 17 Jan 2008 23:13:55 -0000 1.352
+++ cmake.cxx 18 Jan 2008 15:25:25 -0000 1.353
@@ -1185,7 +1185,19 @@
std::string dirName = args[2];
dirName += "/Progress";
cmSystemTools::RemoveADirectory(dirName.c_str());
- int count = atoi(args[3].c_str());
+
+ // is the last argument a filename that exists?
+ FILE *countFile = fopen(args[3].c_str(),"r");
+ int count;
+ if (countFile)
+ {
+ fscanf(countFile,"%i",&count);
+ fclose(countFile);
+ }
+ else
+ {
+ count = atoi(args[3].c_str());
+ }
if (count)
{
cmSystemTools::MakeDirectory(dirName.c_str());
Index: cmLocalUnixMakefileGenerator3.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -d -r1.234 -r1.235
--- cmLocalUnixMakefileGenerator3.cxx 18 Jan 2008 13:35:37 -0000 1.234
+++ cmLocalUnixMakefileGenerator3.cxx 18 Jan 2008 15:25:25 -0000 1.235
@@ -210,8 +210,7 @@
cmGlobalUnixMakefileGenerator3 *gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
- ruleFileStream << "CMAKE_ALL_PROGRESS = "
- << gg->GetNumberOfProgressActionsInAll(this) << "\n";
+ ruleFileStream << gg->GetNumberOfProgressActionsInAll(this) << "\n";
}
//----------------------------------------------------------------------------
@@ -1577,17 +1576,6 @@
this->WriteSpecialTargetsTop(ruleFileStream);
// Include the progress variables for the target.
- std::string progressFile = cmake::GetCMakeFilesDirectory();
- progressFile += "/progress.make";
- std::string progressFileNameFull =
- this->ConvertToFullPath(progressFile.c_str());
- ruleFileStream
- << "# Include the progress variables for this target.\n"
- << this->IncludeDirective << " "
- << this->Convert(progressFileNameFull.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::MAKEFILE) << "\n\n";
-
// Write all global targets
this->WriteDivider(ruleFileStream);
ruleFileStream
@@ -1672,7 +1660,14 @@
progCmd << this->Convert(progressDir.c_str(),
cmLocalGenerator::FULL,
cmLocalGenerator::SHELL);
- progCmd << " $(CMAKE_ALL_PROGRESS)";
+
+ std::string progressFile = cmake::GetCMakeFilesDirectory();
+ progressFile += "/progress.make";
+ std::string progressFileNameFull =
+ this->ConvertToFullPath(progressFile.c_str());
+ progCmd << " " << this->Convert(progressFileNameFull.c_str(),
+ cmLocalGenerator::FULL,
+ cmLocalGenerator::SHELL);
commands.push_back(progCmd.str());
}
std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash();
More information about the Cmake-commits
mailing list