diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-09 02:36:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:34 (GMT) |
commit | 466abd846fdbe17f4cff8a6008396eb1887b70c3 (patch) | |
tree | de33987ee4b221d83de9dfd61dfcdf71579c3447 /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 8d60da0cb56b44815f02ece01e224e1f4eba6c80 (diff) | |
download | CMake-466abd846fdbe17f4cff8a6008396eb1887b70c3.zip CMake-466abd846fdbe17f4cff8a6008396eb1887b70c3.tar.gz CMake-466abd846fdbe17f4cff8a6008396eb1887b70c3.tar.bz2 |
cmTargetLinkLibrariesCommand: Use a string argument
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index b16f311..8dc407b 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -272,7 +272,7 @@ bool cmTargetLinkLibrariesCommand { // The link type was specified by the previous argument. haveLLT = false; - if (!this->HandleLibrary(args[i].c_str(), llt)) + if (!this->HandleLibrary(args[i], llt)) { return false; } @@ -301,7 +301,7 @@ bool cmTargetLinkLibrariesCommand llt = cmTarget::OPTIMIZED; } } - if (!this->HandleLibrary(args[i].c_str(), llt)) + if (!this->HandleLibrary(args[i], llt)) { return false; } @@ -352,7 +352,7 @@ cmTargetLinkLibrariesCommand //---------------------------------------------------------------------------- bool -cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib, +cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, cmTarget::LinkLibraryType llt) { if(this->Target->GetType() == cmTarget::INTERFACE_LIBRARY @@ -479,13 +479,13 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib, { prop = "LINK_INTERFACE_LIBRARIES_"; prop += *i; - this->Target->AppendProperty(prop.c_str(), lib); + this->Target->AppendProperty(prop.c_str(), lib.c_str()); } } if(llt == cmTarget::OPTIMIZED || llt == cmTarget::GENERAL) { // Put in the non-DEBUG configuration interfaces. - this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib); + this->Target->AppendProperty("LINK_INTERFACE_LIBRARIES", lib.c_str()); // Make sure the DEBUG configuration interfaces exist so that the // general one will not be used as a fall-back. |