summaryrefslogtreecommitdiff
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-09-04 11:08:50 -0400
committerBrad King <brad.king@kitware.com>2018-09-05 15:15:55 -0400
commit4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0 (patch)
treed7609df1293e9d4af24cb27e5d9f024844ed6144 /Source/cmNinjaNormalTargetGenerator.cxx
parent612975c6652c83c29fcfcf56a7b5a0cfe0218c93 (diff)
downloadcmake-4d89830d7117a6fb68346d4ebe5f2f3c6d3223a0.tar.gz
cmMakefile: Make GetRequiredDefinition return std::string
In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b634b0a049..64369698ea 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -530,7 +530,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
linkCmdVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
linkCmdVar, this->TargetLinkLanguage, this->GetConfigName());
- const char* linkCmd = mf->GetRequiredDefinition(linkCmdVar);
+ std::string const& linkCmd = mf->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
{
@@ -541,7 +541,7 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
linkCmdVar = this->GeneratorTarget->GetFeatureSpecificLinkRuleVariable(
linkCmdVar, this->TargetLinkLanguage, this->GetConfigName());
- const char* linkCmd = mf->GetRequiredDefinition(linkCmdVar);
+ std::string const& linkCmd = mf->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
return linkCmds;