diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-11 00:04:11 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 15:03:50 +0100 |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | cmake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz |
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx index 8dc407b5aa..115a988061 100644 --- a/Source/cmTargetLinkLibrariesCommand.cxx +++ b/Source/cmTargetLinkLibrariesCommand.cxx @@ -39,7 +39,7 @@ bool cmTargetLinkLibrariesCommand // Lookup the target for which libraries are specified. this->Target = this->Makefile->GetCMakeInstance() - ->GetGlobalGenerator()->FindTarget(args[0].c_str()); + ->GetGlobalGenerator()->FindTarget(args[0]); if(!this->Target) { cmake::MessageType t = cmake::FATAL_ERROR; // fail by default @@ -124,7 +124,7 @@ bool cmTargetLinkLibrariesCommand ->GetPolicyWarning(cmPolicies::CMP0039) << "\n" "Utility target \"" << this->Target->GetName() << "\" " << modal << " not be used as the target of a target_link_libraries call."; - this->Makefile->IssueMessage(messageType, e.str().c_str()); + this->Makefile->IssueMessage(messageType, e.str()); if(messageType == cmake::FATAL_ERROR) { return false; @@ -289,7 +289,7 @@ bool cmTargetLinkLibrariesCommand std::string linkType = args[0]; linkType += "_LINK_TYPE"; const char* linkTypeString = - this->Makefile->GetDefinition( linkType.c_str() ); + this->Makefile->GetDefinition( linkType ); if(linkTypeString) { if(strcmp(linkTypeString, "debug") == 0) @@ -407,7 +407,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, sig == cmTarget::KeywordTLLSignature ? cmTarget::PlainTLLSignature : cmTarget::KeywordTLLSignature); - this->Makefile->IssueMessage(messageType, e.str().c_str()); + this->Makefile->IssueMessage(messageType, e.str()); if(messageType == cmake::FATAL_ERROR) { return false; @@ -479,7 +479,7 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, { prop = "LINK_INTERFACE_LIBRARIES_"; prop += *i; - this->Target->AppendProperty(prop.c_str(), lib.c_str()); + this->Target->AppendProperty(prop, lib.c_str()); } } if(llt == cmTarget::OPTIMIZED || llt == cmTarget::GENERAL) @@ -494,9 +494,9 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib, { prop = "LINK_INTERFACE_LIBRARIES_"; prop += *i; - if(!this->Target->GetProperty(prop.c_str())) + if(!this->Target->GetProperty(prop)) { - this->Target->SetProperty(prop.c_str(), ""); + this->Target->SetProperty(prop, ""); } } } |