summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGhsMultiGenerator.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-03 11:20:31 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-05 15:21:00 (GMT)
commit18b0330b86cae2771a54021e390f157a097c8a99 (patch)
tree85b770ff9467bdc764d7b42ed2480016c26b2235 /Source/cmGlobalGhsMultiGenerator.cxx
parent2327cc0e0575175e8dec4b7a6fa6cafd5d0f7ca9 (diff)
downloadCMake-18b0330b86cae2771a54021e390f157a097c8a99.zip
CMake-18b0330b86cae2771a54021e390f157a097c8a99.tar.gz
CMake-18b0330b86cae2771a54021e390f157a097c8a99.tar.bz2
clang-tidy: Enable performance-inefficient-string-concatenation
Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
Diffstat (limited to 'Source/cmGlobalGhsMultiGenerator.cxx')
-rw-r--r--Source/cmGlobalGhsMultiGenerator.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 7cfbea6..9f3dab7 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -11,6 +11,7 @@
#include "cmMakefile.h"
#include "cmState.h"
#include "cmStateTypes.h"
+#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmVersion.h"
#include "cmake.h"
@@ -418,17 +419,17 @@ void cmGlobalGhsMultiGenerator::WriteTargets(cmLocalGenerator* root)
}
// create target build file
- std::string name = target->GetName() + ".tgt" + FILE_EXTENSION;
- std::string fname = rootBinaryDir + "/" + name;
+ std::string name = cmStrCat(target->GetName(), ".tgt", FILE_EXTENSION);
+ std::string fname = cmStrCat(rootBinaryDir, "/", name);
cmGeneratedFileStream fbld(fname);
fbld.SetCopyIfDifferent(true);
this->WriteFileHeader(fbld);
GhsMultiGpj::WriteGpjTag(GhsMultiGpj::PROJECT, fbld);
std::vector<cmGeneratorTarget const*> build;
if (ComputeTargetBuildOrder(target, build)) {
- std::string message = "The inter-target dependency graph for target [" +
- target->GetName() + "] had a cycle.\n";
- cmSystemTools::Error(message);
+ cmSystemTools::Error(
+ cmStrCat("The inter-target dependency graph for target [",
+ target->GetName(), "] had a cycle.\n"));
} else {
for (auto& tgt : build) {
WriteProjectLine(fbld, tgt, root, rootBinaryDir);