summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-08-13 13:57:23 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-08-19 08:49:30 (GMT)
commit5a2a275bb41e04891c2541a8e185b6daed259b0b (patch)
treef925d8384da5c4c9d921a6b47ad648f9b0b1bf78 /Source/cmNinjaTargetGenerator.cxx
parent2984df91002fe3e3db0d38f364e9842024a8ab2e (diff)
downloadCMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.zip
CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.gz
CMake-5a2a275bb41e04891c2541a8e185b6daed259b0b.tar.bz2
Refactor: reduce cmToCStr usage
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 609848b..1b6b834 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -994,8 +994,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
for (cmSourceFile const* sf : externalObjects) {
auto objectFileName = this->GetGlobalGenerator()->ExpandCFGIntDir(
this->ConvertToNinjaPath(sf->GetFullPath()), config);
- if (!cmSystemTools::StringEndsWith(objectFileName,
- cmToCStr(pchExtension))) {
+ if (!cmHasSuffix(objectFileName, pchExtension)) {
this->Configs[config].Objects.push_back(objectFileName);
}
}
@@ -1260,8 +1259,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
if (firstForConfig) {
cmProp pchExtension =
this->GetMakefile()->GetDefinition("CMAKE_PCH_EXTENSION");
- if (!cmSystemTools::StringEndsWith(objectFileName,
- cmToCStr(pchExtension))) {
+ if (!cmHasSuffix(objectFileName, pchExtension)) {
// Add this object to the list of object files.
this->Configs[config].Objects.push_back(objectFileName);
}