diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-17 09:56:48 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-17 09:58:46 (GMT) |
commit | 7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4 (patch) | |
tree | 1af10b5267eb0f9821313bb3eb47900b2d205fe8 /Source/cmLocalGenerator.cxx | |
parent | 241048d6ceb5dd4a16950c29286aebbcc46e565c (diff) | |
download | CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.zip CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.gz CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.bz2 |
cmSystemTools::VersionCompare: use std::string for arguments
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 5042874..4c3e8ec 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1961,10 +1961,10 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, cmStrCat("CMAKE_", lang, "_SIMULATE_ID")); if (lang == "Swift") { if (cmProp v = target->GetProperty("Swift_LANGUAGE_VERSION")) { - if (cmSystemTools::VersionCompare(cmSystemTools::OP_GREATER_EQUAL, - cmToCStr(this->Makefile->GetDefinition( - "CMAKE_Swift_COMPILER_VERSION")), - "4.2")) { + if (cmSystemTools::VersionCompare( + cmSystemTools::OP_GREATER_EQUAL, + this->Makefile->GetDefinition("CMAKE_Swift_COMPILER_VERSION"), + "4.2")) { this->AppendFlags(flags, "-swift-version " + *v); } } @@ -2622,8 +2622,8 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target) // MSVC 2008 is producing both .pdb and .idb files with /Zi. bool msvc2008OrLess = - cmSystemTools::VersionCompare( - cmSystemTools::OP_LESS, compilerVersion.c_str(), "16.0") && + cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, + compilerVersion, "16.0") && compilerId == "MSVC"; // but not when used via toolset -Tv90 if (this->Makefile->GetSafeDefinition( |