summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-11-21 13:59:43 (GMT)
committerBrad King <brad.king@kitware.com>2007-11-21 13:59:43 (GMT)
commit91f68fc391d374181500d213f320e9049267016a (patch)
tree2ba98c5f2cdec966d978e4443da12bac8ab6b750
parent553852f99092f119717478aa07ad6ae753a00e5e (diff)
downloadCMake-91f68fc391d374181500d213f320e9049267016a.zip
CMake-91f68fc391d374181500d213f320e9049267016a.tar.gz
CMake-91f68fc391d374181500d213f320e9049267016a.tar.bz2
BUG: For imported target directory, do not return pointer to freed memory.
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 400337b..e74dd85 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1322,8 +1322,8 @@ const char* cmTarget::GetDirectory(const char* config, bool implib)
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 @@ const char* cmTarget::ImportedGetLocation(const char* config)
{
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)))