Skip to content
Snippets Groups Projects
Commit ad594de8 authored by Brad King's avatar Brad King
Browse files

cmSystemTools: Add VersionCompareEqual helper

Wrap a call to VersionCompare with OP_EQUAL.
parent c173e37f
No related branches found
No related tags found
No related merge requests found
......@@ -2776,6 +2776,14 @@ bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,
return op == cmSystemTools::OP_EQUAL;
}
//----------------------------------------------------------------------------
bool cmSystemTools::VersionCompareEqual(std::string const& lhs,
std::string const& rhs)
{
return cmSystemTools::VersionCompare(
cmSystemTools::OP_EQUAL, lhs.c_str(), rhs.c_str());
}
//----------------------------------------------------------------------------
bool cmSystemTools::VersionCompareGreater(std::string const& lhs,
std::string const& rhs)
......
......@@ -294,6 +294,8 @@ public:
* Compare versions
*/
static bool VersionCompare(CompareOp op, const char* lhs, const char* rhs);
static bool VersionCompareEqual(std::string const& lhs,
std::string const& rhs);
static bool VersionCompareGreater(std::string const& lhs,
std::string const& rhs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment