[Cmake-commits] [cmake-commits] king committed cmGlobalGenerator.cxx 1.229 1.230 cmGlobalGenerator.h 1.108 1.109
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue May 27 11:18:05 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24121/Source
Modified Files:
cmGlobalGenerator.cxx cmGlobalGenerator.h
Log Message:
BUG: Fix crash on repeated configure steps and exported targets.
- In cmGlobalGenerator the ExportSets ivar must be cleared at
the beginning of each Configure.
- See issue #7101.
Index: cmGlobalGenerator.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.h,v
retrieving revision 1.108
retrieving revision 1.109
diff -C 2 -d -r1.108 -r1.109
*** cmGlobalGenerator.h 12 May 2008 21:43:45 -0000 1.108
--- cmGlobalGenerator.h 27 May 2008 15:18:01 -0000 1.109
***************
*** 294,297 ****
--- 294,298 ----
// Sets of named target exports
std::map<cmStdString, std::vector<cmTargetExport*> > ExportSets;
+ void ClearExportSets();
// Manifest of all targets that will be built for each configuration.
Index: cmGlobalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGlobalGenerator.cxx,v
retrieving revision 1.229
retrieving revision 1.230
diff -C 2 -d -r1.229 -r1.230
*** cmGlobalGenerator.cxx 12 May 2008 21:43:44 -0000 1.229
--- cmGlobalGenerator.cxx 27 May 2008 15:18:00 -0000 1.230
***************
*** 73,86 ****
}
! for (std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
! setIt = this->ExportSets.begin();
! setIt != this->ExportSets.end();
! ++setIt)
! {
! for (unsigned int i = 0; i < setIt->second.size(); ++i)
! {
! delete setIt->second[i];
! }
! }
}
--- 73,77 ----
}
! this->ClearExportSets();
}
***************
*** 684,687 ****
--- 675,679 ----
{
this->FirstTimeProgress = 0.0f;
+ this->ClearExportSets();
// Delete any existing cmLocalGenerators
unsigned int i;
***************
*** 1233,1236 ****
--- 1225,1243 ----
}
+ //----------------------------------------------------------------------------
+ void cmGlobalGenerator::ClearExportSets()
+ {
+ for(std::map<cmStdString, std::vector<cmTargetExport*> >::iterator
+ setIt = this->ExportSets.begin();
+ setIt != this->ExportSets.end(); ++setIt)
+ {
+ for(unsigned int i = 0; i < setIt->second.size(); ++i)
+ {
+ delete setIt->second[i];
+ }
+ }
+ this->ExportSets.clear();
+ }
+
const std::vector<cmTargetExport*>* cmGlobalGenerator::GetExportSet(
const char* name) const
More information about the Cmake-commits
mailing list