[cmake-commits] king committed cmTarget.cxx 1.166 1.167

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Nov 21 08:59:45 EST 2007


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

Modified Files:
	cmTarget.cxx 
Log Message:
BUG: For imported target directory, do not return pointer to freed memory.


Index: cmTarget.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmTarget.cxx,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- cmTarget.cxx	30 Oct 2007 15:03:16 -0000	1.166
+++ cmTarget.cxx	21 Nov 2007 13:59:43 -0000	1.167
@@ -1322,8 +1322,8 @@
 const char* cmTarget::ImportedGetDirectory(const char* config, bool)
 {
   const char* location=this->GetLocation(config);
-  std::string directory=cmSystemTools::GetFilenamePath(location);
-  return directory.c_str();
+  this->Directory = cmSystemTools::GetFilenamePath(location);
+  return this->Directory.c_str();
 }
 
 //----------------------------------------------------------------------------
@@ -1362,7 +1362,7 @@
 {
   if ((config) && (strlen(config)))
     {
-    std::string propertyName=config;
+    std::string propertyName=cmSystemTools::UpperCase(config);
     propertyName+="_LOCATION";
     const char* configLocation=this->GetProperty(propertyName.c_str());
     if ((configLocation) && (strlen(configLocation)))



More information about the Cmake-commits mailing list