diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-13 13:57:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-08-19 08:49:30 (GMT) |
commit | 5a2a275bb41e04891c2541a8e185b6daed259b0b (patch) | |
tree | f925d8384da5c4c9d921a6b47ad648f9b0b1bf78 /Source/cmMakefileTargetGenerator.cxx | |
parent | 2984df91002fe3e3db0d38f364e9842024a8ab2e (diff) | |
download | CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.zip CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.gz CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.bz2 |
Refactor: reduce cmToCStr usage
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 626453f..c83a7ab 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -293,8 +293,7 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() this->GetConfigName()); for (cmSourceFile const* sf : externalObjects) { auto const& objectFileName = sf->GetFullPath(); - if (!cmSystemTools::StringEndsWith(objectFileName, - cmToCStr(pchExtension))) { + if (!cmHasSuffix(objectFileName, pchExtension)) { this->ExternalObjects.push_back(objectFileName); } } @@ -1732,7 +1731,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( cmProp pchExtension = this->Makefile->GetDefinition("CMAKE_PCH_EXTENSION"); for (std::string const& obj : this->Objects) { - if (cmSystemTools::StringEndsWith(obj, cmToCStr(pchExtension))) { + if (cmHasSuffix(obj, pchExtension)) { continue; } *this->BuildFileStream << " " << lineContinue; @@ -1822,7 +1821,7 @@ void cmMakefileTargetGenerator::WriteObjectsStrings( objStrings, this->LocalGenerator, this->LocalGenerator->GetStateSnapshot().GetDirectory(), limit); for (std::string const& obj : this->Objects) { - if (cmSystemTools::StringEndsWith(obj, cmToCStr(pchExtension))) { + if (cmHasSuffix(obj, pchExtension)) { continue; } helper.Feed(obj); |