summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-17 13:25:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-17 13:26:05 (GMT)
commit3020354f7c86f959d707aed2b833692204dd7778 (patch)
tree79dc1ca02491338fe78001ffdd4c72ad26cac212 /Source/cmNinjaTargetGenerator.cxx
parent736f9d184da2109b009078e3184e996883bd7554 (diff)
parent23e8364aedcbeb7ce606b6075c98827e52f0c7f6 (diff)
downloadCMake-3020354f7c86f959d707aed2b833692204dd7778.zip
CMake-3020354f7c86f959d707aed2b833692204dd7778.tar.gz
CMake-3020354f7c86f959d707aed2b833692204dd7778.tar.bz2
Merge topic 'string-cleanup'
23e8364aed Source: std::string related cleanup Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Merge-request: !3324
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 8afac70..e5f5bf2 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -813,7 +813,8 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements()
<< cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
<< " target " << this->GetTargetName() << "\n\n";
- std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
+ const std::string& config =
+ this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
std::vector<cmSourceFile const*> customCommands;
this->GeneratorTarget->GetCustomCommands(customCommands, config);
for (cmSourceFile const* sf : customCommands) {
@@ -1093,7 +1094,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
if (compilePP) {
// In case compilation requires flags that are incompatible with
// preprocessing, include them here.
- std::string const postFlag = this->Makefile->GetSafeDefinition(
+ std::string const& postFlag = this->Makefile->GetSafeDefinition(
"CMAKE_" + language + "_POSTPROCESS_FLAG");
this->LocalGenerator->AppendFlags(vars["FLAGS"], postFlag);
}
@@ -1342,8 +1343,7 @@ void cmNinjaTargetGenerator::EnsureDirectoryExists(
cmSystemTools::MakeDirectory(path);
} else {
cmGlobalNinjaGenerator* gg = this->GetGlobalGenerator();
- std::string fullPath =
- std::string(gg->GetCMakeInstance()->GetHomeOutputDirectory());
+ std::string fullPath = gg->GetCMakeInstance()->GetHomeOutputDirectory();
// Also ensures their is a trailing slash.
gg->StripNinjaOutputPathPrefixAsSuffix(fullPath);
fullPath += path;