diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2016-08-05 18:11:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-08-09 13:30:34 (GMT) |
commit | 02d177c9cc05514baccfa530ab85eec65374fbcb (patch) | |
tree | 2fbef7a16d4acac2b3b7218ef1abd16690566d9a /Source/cmSystemTools.h | |
parent | 93b705a396c23f771ba203efb6f2f4934ae027b7 (diff) | |
download | CMake-02d177c9cc05514baccfa530ab85eec65374fbcb.zip CMake-02d177c9cc05514baccfa530ab85eec65374fbcb.tar.gz CMake-02d177c9cc05514baccfa530ab85eec65374fbcb.tar.bz2 |
Add additional <= and >= comparison operators
This adds the LESS_EQUAL, GREATER_EQUAL, and associated STR and VERSION
equivalents to use the combined <= and >= functionality.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 39e7994..d0a28e1 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -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 |