cmSystemTools: Add VersionCompareGreater helper
Wrap a call to VersionCompare with OP_GREATER in a signature suitable for use with std::sort.
This commit is contained in:
parent
b31ac171a4
commit
61c472a287
|
@ -2776,6 +2776,14 @@ bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op,
|
||||||
return op == cmSystemTools::OP_EQUAL;
|
return op == cmSystemTools::OP_EQUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool cmSystemTools::VersionCompareGreater(std::string const& lhs,
|
||||||
|
std::string const& rhs)
|
||||||
|
{
|
||||||
|
return cmSystemTools::VersionCompare(
|
||||||
|
cmSystemTools::OP_GREATER, lhs.c_str(), rhs.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
|
bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg,
|
||||||
bool* removed)
|
bool* removed)
|
||||||
|
|
|
@ -294,6 +294,8 @@ public:
|
||||||
* Compare versions
|
* Compare versions
|
||||||
*/
|
*/
|
||||||
static bool VersionCompare(CompareOp op, const char* lhs, const char* rhs);
|
static bool VersionCompare(CompareOp op, const char* lhs, const char* rhs);
|
||||||
|
static bool VersionCompareGreater(std::string const& lhs,
|
||||||
|
std::string const& rhs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the file type based on the extension
|
* Determine the file type based on the extension
|
||||||
|
|
Loading…
Reference in New Issue