mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 22:50:26 -06:00
Add additional <= and >= comparison operators
This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION equivalents to use the combined <= and >= functionality.
This commit is contained in:
@@ -284,9 +284,11 @@ public:
|
||||
|
||||
enum CompareOp
|
||||
{
|
||||
OP_LESS,
|
||||
OP_GREATER,
|
||||
OP_EQUAL
|
||||
OP_EQUAL = 1,
|
||||
OP_LESS = 2,
|
||||
OP_GREATER = 4,
|
||||
OP_LESS_EQUAL = OP_LESS | OP_EQUAL,
|
||||
OP_GREATER_EQUAL = OP_GREATER | OP_EQUAL
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -297,6 +299,8 @@ public:
|
||||
std::string const& rhs);
|
||||
static bool VersionCompareGreater(std::string const& lhs,
|
||||
std::string const& rhs);
|
||||
static bool VersionCompareGreaterEq(std::string const& lhs,
|
||||
std::string const& rhs);
|
||||
|
||||
/**
|
||||
* Determine the file type based on the extension
|
||||
|
||||
Reference in New Issue
Block a user