summaryrefslogtreecommitdiffstats
path: root/Source/cmSourceGroupCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-23 14:03:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-23 14:03:57 (GMT)
commit7f2bb732fc2b684f5b36c522d75ae50faaabab45 (patch)
treecca3f50e8efed9a8997d95d1e9f3b26948500a3e /Source/cmSourceGroupCommand.cxx
parent68126f5a02b7d21b0d632b9e2c63687b71b3f5fa (diff)
parent9b334397f55b70689ff1d8f7d6767a34834e85b6 (diff)
downloadCMake-7f2bb732fc2b684f5b36c522d75ae50faaabab45.zip
CMake-7f2bb732fc2b684f5b36c522d75ae50faaabab45.tar.gz
CMake-7f2bb732fc2b684f5b36c522d75ae50faaabab45.tar.bz2
Merge topic 'source_sweep_cmStrCat'
9b334397f5 Source sweep: Use cmStrCat for string concatenation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !3699
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-rw-r--r--Source/cmSourceGroupCommand.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx
index 146e06d..399f1da 100644
--- a/Source/cmSourceGroupCommand.cxx
+++ b/Source/cmSourceGroupCommand.cxx
@@ -30,9 +30,7 @@ std::string getFullFilePath(const std::string& currentPath,
std::string fullPath = path;
if (!cmSystemTools::FileIsFullPath(path)) {
- fullPath = currentPath;
- fullPath += "/";
- fullPath += path;
+ fullPath = cmStrCat(currentPath, '/', path);
}
return cmSystemTools::CollapseFullPath(fullPath);
@@ -236,9 +234,8 @@ bool cmSourceGroupCommand::InitialPass(std::vector<std::string> const& args,
for (auto const& filesArg : filesArguments) {
std::string src = filesArg;
if (!cmSystemTools::FileIsFullPath(src)) {
- src = this->Makefile->GetCurrentSourceDirectory();
- src += "/";
- src += filesArg;
+ src =
+ cmStrCat(this->Makefile->GetCurrentSourceDirectory(), '/', filesArg);
}
src = cmSystemTools::CollapseFullPath(src);
sg->AddGroupFile(src);