cmSystemTools: Add VersionCompareEqual helper
Wrap a call to VersionCompare with OP_EQUAL.
This commit is contained in:
parent
c173e37fa3
commit
ad594de8cc
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue