[Cmake-commits] [cmake-commits] king committed cmCPackGenerator.cxx 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jul 28 10:46:48 EDT 2009


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv19391/Source/CPack

Modified Files:
	cmCPackGenerator.cxx 
Log Message:
BUG: Do not double-initialize local generators

All global generator CreateLocalGenerator methods automatically
initialize the local generator instances with SetGlobalGenerator.  In
several places we were calling SetGlobalGenerator again after receiving
the return value from CreateLocalGenerator.  The double-initializations
leaked the resources allocated by the first call to SetGlobalGenerator.
This fix removes the unnecessary calls.


Index: cmCPackGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackGenerator.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** cmCPackGenerator.cxx	5 Feb 2009 21:31:37 -0000	1.17
--- cmCPackGenerator.cxx	28 Jul 2009 14:46:45 -0000	1.18
***************
*** 624,628 ****
          gg.SetCMakeInstance(&cm);
          std::auto_ptr<cmLocalGenerator> lg(gg.CreateLocalGenerator());
-         lg->SetGlobalGenerator(&gg);
          cmMakefile *mf = lg->GetMakefile();
          std::string realInstallDirectory = tempInstallDirectory;
--- 624,627 ----



More information about the Cmake-commits mailing list