summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-10 23:04:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-11 14:03:50 (GMT)
commit21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch)
tree8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmNinjaNormalTargetGenerator.cxx
parente21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff)
downloadCMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2
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/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a49fc2d..686ec81 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -175,7 +175,7 @@ cmNinjaNormalTargetGenerator
// build response file name
std::string cmakeLinkVar = cmakeVarLang + "_RESPONSE_FILE_LINK_FLAG";
- const char * flag = GetMakefile()->GetDefinition(cmakeLinkVar.c_str());
+ const char * flag = GetMakefile()->GetDefinition(cmakeLinkVar);
if(flag) {
responseFlag = flag;
} else {
@@ -189,7 +189,7 @@ cmNinjaNormalTargetGenerator
linkOptionVar += "_COMPILER_LINKER_OPTION_FLAG_";
linkOptionVar += cmTarget::GetTargetTypeName(targetType);
const std::string linkOption =
- GetMakefile()->GetSafeDefinition(linkOptionVar.c_str());
+ GetMakefile()->GetSafeDefinition(linkOptionVar);
rspcontent = "$in_newline "+linkOption+" $LINK_PATH $LINK_LIBRARIES";
vars.Objects = responseFlag.c_str();
vars.LinkLibraries = "";
@@ -321,7 +321,7 @@ cmNinjaNormalTargetGenerator
linkCmdVar += this->TargetLinkLanguage;
linkCmdVar += "_CREATE_STATIC_LIBRARY";
if (const char *linkCmd =
- this->GetMakefile()->GetDefinition(linkCmdVar.c_str()))
+ this->GetMakefile()->GetDefinition(linkCmdVar))
{
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
return linkCmds;
@@ -341,7 +341,7 @@ cmNinjaNormalTargetGenerator
linkCmdVar += this->TargetLinkLanguage;
linkCmdVar += "_ARCHIVE_CREATE";
const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
+ this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
{
@@ -349,7 +349,7 @@ cmNinjaNormalTargetGenerator
linkCmdVar += this->TargetLinkLanguage;
linkCmdVar += "_ARCHIVE_FINISH";
const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
+ this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
return linkCmds;
@@ -374,7 +374,7 @@ cmNinjaNormalTargetGenerator
}
const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar.c_str());
+ this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
return linkCmds;
}
@@ -497,7 +497,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (!install_name_dir.empty()) {
vars["INSTALLNAME_DIR"] =
- this->GetLocalGenerator()->Convert(install_name_dir.c_str(),
+ this->GetLocalGenerator()->Convert(install_name_dir,
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL, false);
}
@@ -506,7 +506,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
if (!this->TargetNameImport.empty()) {
const std::string impLibPath = this->GetLocalGenerator()
- ->ConvertToOutputFormat(targetOutputImplib.c_str(),
+ ->ConvertToOutputFormat(targetOutputImplib,
cmLocalGenerator::SHELL);
vars["TARGET_IMPLIB"] = impLibPath;
EnsureParentDirectoryExists(impLibPath);