diff options
Diffstat (limited to 'Source/cmFortranParserImpl.cxx')
-rw-r--r-- | Source/cmFortranParserImpl.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmFortranParserImpl.cxx b/Source/cmFortranParserImpl.cxx index e8b1da8..ad377de 100644 --- a/Source/cmFortranParserImpl.cxx +++ b/Source/cmFortranParserImpl.cxx @@ -1,6 +1,8 @@ /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmFortranParser.h" + +#include "cmStringAlgorithms.h" #include "cmSystemTools.h" #include <assert.h> @@ -22,9 +24,7 @@ bool cmFortranParser_s::FindIncludeFile(const char* dir, } // Check for the file in the directory containing the including // file. - std::string fullName = dir; - fullName += "/"; - fullName += includeName; + std::string fullName = cmStrCat(dir, '/', includeName); if (cmSystemTools::FileExists(fullName, true)) { fileName = fullName; return true; @@ -32,9 +32,7 @@ bool cmFortranParser_s::FindIncludeFile(const char* dir, // Search the include path for the file. for (std::string const& i : this->IncludePath) { - fullName = i; - fullName += "/"; - fullName += includeName; + fullName = cmStrCat(i, '/', includeName); if (cmSystemTools::FileExists(fullName, true)) { fileName = fullName; return true; |