summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-12-14 14:30:00 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-12-14 14:30:28 (GMT)
commitc34b4497f8d595390d8e5a9d216de9ddc95a47eb (patch)
tree51662f8532e04391c56d3fcd245ec2069e93a1bd /Source/cmTargetLinkLibrariesCommand.cxx
parent2d53894c31c9d6849c67f4c218c0aefed1eb7921 (diff)
downloadCMake-c34b4497f8d595390d8e5a9d216de9ddc95a47eb.zip
CMake-c34b4497f8d595390d8e5a9d216de9ddc95a47eb.tar.gz
CMake-c34b4497f8d595390d8e5a9d216de9ddc95a47eb.tar.bz2
cmTarget: add std::string overloads
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 0d2383a..e1ac6a8 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -480,7 +480,7 @@ static bool HandleLibrary(cmMakefile& mf, cmTarget* target,
cmGeneratorExpression::Find(lib) != std::string::npos) {
configLib = "$<LINK_ONLY:" + configLib + ">";
}
- target->AppendProperty("INTERFACE_LINK_LIBRARIES", configLib.c_str());
+ target->AppendProperty("INTERFACE_LINK_LIBRARIES", configLib);
}
return true;
}
@@ -488,9 +488,8 @@ static bool HandleLibrary(cmMakefile& mf, cmTarget* target,
// Handle general case where the command was called with another keyword than
// PRIVATE / LINK_PRIVATE or none at all. (The "INTERFACE_LINK_LIBRARIES"
// property of the target on the LHS shall be populated.)
- target->AppendProperty(
- "INTERFACE_LINK_LIBRARIES",
- target->GetDebugGeneratorExpressions(libRef, llt).c_str());
+ target->AppendProperty("INTERFACE_LINK_LIBRARIES",
+ target->GetDebugGeneratorExpressions(libRef, llt));
// Stop processing if called without any keyword.
if (currentProcessingState == ProcessingLinkLibraries) {
@@ -522,12 +521,12 @@ static bool HandleLibrary(cmMakefile& mf, cmTarget* target,
// Put in the DEBUG configuration interfaces.
for (std::string const& dc : debugConfigs) {
prop = cmStrCat("LINK_INTERFACE_LIBRARIES_", dc);
- target->AppendProperty(prop, libRef.c_str());
+ target->AppendProperty(prop, libRef);
}
}
if (llt == OPTIMIZED_LibraryType || llt == GENERAL_LibraryType) {
// Put in the non-DEBUG configuration interfaces.
- target->AppendProperty("LINK_INTERFACE_LIBRARIES", libRef.c_str());
+ target->AppendProperty("LINK_INTERFACE_LIBRARIES", libRef);
// Make sure the DEBUG configuration interfaces exist so that the
// general one will not be used as a fall-back.