diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-08-13 10:06:19 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-08-13 16:12:47 (GMT) |
commit | 3aa11f31fcb9780d6e54647a97ca876a2a409251 (patch) | |
tree | 028811cfd2b61b280538392a6dc93771f127962c /Source/cmQtAutoGen.h | |
parent | 1d87c9f318b45ba9984378580d5b4926acfd4c11 (diff) | |
download | CMake-3aa11f31fcb9780d6e54647a97ca876a2a409251.zip CMake-3aa11f31fcb9780d6e54647a97ca876a2a409251.tar.gz CMake-3aa11f31fcb9780d6e54647a97ca876a2a409251.tar.bz2 |
Autogen: Use integers to store the Qt version
Diffstat (limited to 'Source/cmQtAutoGen.h')
-rw-r--r-- | Source/cmQtAutoGen.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index a3e16ac..4118dc7 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -28,6 +28,32 @@ public: RCC }; + /// @brief Integer version + struct IntegerVersion + { + unsigned int Major = 0; + unsigned int Minor = 0; + + IntegerVersion() = default; + IntegerVersion(unsigned int major, unsigned int minor) + : Major(major) + , Minor(minor) + { + } + + bool operator>(IntegerVersion const version) + { + return (this->Major > version.Major) || + ((this->Major == version.Major) && (this->Minor > version.Minor)); + } + + bool operator>=(IntegerVersion const version) + { + return (this->Major > version.Major) || + ((this->Major == version.Major) && (this->Minor >= version.Minor)); + } + }; + public: /// @brief Returns the generator name static std::string const& GeneratorName(GeneratorT genType); |