summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-09-17 09:56:48 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-09-17 09:58:46 (GMT)
commit7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4 (patch)
tree1af10b5267eb0f9821313bb3eb47900b2d205fe8 /Source/cmGlobalNinjaGenerator.cxx
parent241048d6ceb5dd4a16950c29286aebbcc46e565c (diff)
downloadCMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.zip
CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.gz
CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.bz2
cmSystemTools::VersionCompare: use std::string for arguments
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx59
1 files changed, 29 insertions, 30 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index c6f82f9..6279d68 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -558,9 +558,8 @@ void cmGlobalNinjaGenerator::GetDocumentation(cmDocumentationEntry& entry)
void cmGlobalNinjaGenerator::Generate()
{
// Check minimum Ninja version.
- if (cmSystemTools::VersionCompare(cmSystemTools::OP_LESS,
- this->NinjaVersion.c_str(),
- RequiredNinjaVersion().c_str())) {
+ if (cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersion())) {
std::ostringstream msg;
msg << "The detected version of Ninja (" << this->NinjaVersion;
msg << ") is less than the version of Ninja required by CMake (";
@@ -721,21 +720,21 @@ bool cmGlobalNinjaGenerator::FindMakeProgram(cmMakefile* mf)
void cmGlobalNinjaGenerator::CheckNinjaFeatures()
{
- this->NinjaSupportsConsolePool = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForConsolePool().c_str());
+ this->NinjaSupportsConsolePool =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForConsolePool());
this->NinjaSupportsImplicitOuts = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- cmGlobalNinjaGenerator::RequiredNinjaVersionForImplicitOuts().c_str());
- this->NinjaSupportsManifestRestat = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForManifestRestat().c_str());
- this->NinjaSupportsMultilineDepfile = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForMultilineDepfile().c_str());
- this->NinjaSupportsDyndeps = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForDyndeps().c_str());
+ cmSystemTools::OP_LESS, this->NinjaVersion,
+ cmGlobalNinjaGenerator::RequiredNinjaVersionForImplicitOuts());
+ this->NinjaSupportsManifestRestat =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForManifestRestat());
+ this->NinjaSupportsMultilineDepfile =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForMultilineDepfile());
+ this->NinjaSupportsDyndeps =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForDyndeps());
if (!this->NinjaSupportsDyndeps) {
// The ninja version number is not new enough to have upstream support.
// Our ninja branch adds ".dyndep-#" to its version number,
@@ -753,21 +752,21 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
}
this->NinjaSupportsUnconditionalRecompactTool =
!cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForUnconditionalRecompactTool().c_str());
- this->NinjaSupportsRestatTool = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForRestatTool().c_str());
- this->NinjaSupportsMultipleOutputs = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForMultipleOutputs().c_str());
+ cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForUnconditionalRecompactTool());
+ this->NinjaSupportsRestatTool =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForRestatTool());
+ this->NinjaSupportsMultipleOutputs =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForMultipleOutputs());
this->NinjaSupportsMetadataOnRegeneration = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForMetadataOnRegeneration().c_str());
+ cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForMetadataOnRegeneration());
#ifdef _WIN32
- this->NinjaSupportsCodePage = !cmSystemTools::VersionCompare(
- cmSystemTools::OP_LESS, this->NinjaVersion.c_str(),
- RequiredNinjaVersionForCodePage().c_str());
+ this->NinjaSupportsCodePage =
+ !cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, this->NinjaVersion,
+ RequiredNinjaVersionForCodePage());
if (this->NinjaSupportsCodePage) {
this->CheckNinjaCodePage();
} else {