diff options
author | Brad King <brad.king@kitware.com> | 2019-08-23 14:03:33 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-08-23 14:03:57 (GMT) |
commit | 7f2bb732fc2b684f5b36c522d75ae50faaabab45 (patch) | |
tree | cca3f50e8efed9a8997d95d1e9f3b26948500a3e /Source/cmLocalCommonGenerator.cxx | |
parent | 68126f5a02b7d21b0d632b9e2c63687b71b3f5fa (diff) | |
parent | 9b334397f55b70689ff1d8f7d6767a34834e85b6 (diff) | |
download | CMake-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/cmLocalCommonGenerator.cxx')
-rw-r--r-- | Source/cmLocalCommonGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmLocalCommonGenerator.cxx b/Source/cmLocalCommonGenerator.cxx index 75ad2a6..7c36bdc 100644 --- a/Source/cmLocalCommonGenerator.cxx +++ b/Source/cmLocalCommonGenerator.cxx @@ -8,6 +8,7 @@ #include "cmGeneratorTarget.h" #include "cmMakefile.h" #include "cmOutputConverter.h" +#include "cmStringAlgorithms.h" class cmGlobalGenerator; @@ -51,9 +52,9 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags( this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT"); } if (!mod_dir.empty()) { - std::string modflag = - this->Makefile->GetRequiredDefinition("CMAKE_Fortran_MODDIR_FLAG"); - modflag += mod_dir; + std::string modflag = cmStrCat( + this->Makefile->GetRequiredDefinition("CMAKE_Fortran_MODDIR_FLAG"), + mod_dir); this->AppendFlags(flags, modflag); } @@ -65,8 +66,9 @@ std::string cmLocalCommonGenerator::GetTargetFortranFlags( std::vector<std::string> includes; this->GetIncludeDirectories(includes, target, "C", config); for (std::string const& id : includes) { - std::string flg = modpath_flag; - flg += this->ConvertToOutputFormat(id, cmOutputConverter::SHELL); + std::string flg = + cmStrCat(modpath_flag, + this->ConvertToOutputFormat(id, cmOutputConverter::SHELL)); this->AppendFlags(flags, flg); } } |