diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-09-16 03:15:47 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-09-17 10:12:08 (GMT) |
commit | 2a2f0ac231fe31052c6fabc2b2829653c5cea2fa (patch) | |
tree | 153dd88c872200e2eb757a5f19349bf3922f6919 | |
parent | 18eb4c637a6fb35bf8207e5f39d3e701fdcf973b (diff) | |
download | CMake-2a2f0ac231fe31052c6fabc2b2829653c5cea2fa.zip CMake-2a2f0ac231fe31052c6fabc2b2829653c5cea2fa.tar.gz CMake-2a2f0ac231fe31052c6fabc2b2829653c5cea2fa.tar.bz2 |
Help: Clarify handling of non-integer components in if() version tests
-rw-r--r-- | Help/command/if.rst | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Help/command/if.rst b/Help/command/if.rst index f04f233..5294ce8 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -148,23 +148,33 @@ Possible expressions are: ``if(<variable|string> VERSION_LESS <variable|string>)`` Component-wise integer version number comparison (version format is - ``major[.minor[.patch[.tweak]]]``). + ``major[.minor[.patch[.tweak]]]``, omitted components are treated as zero). + Any non-integer version component or non-integer trailing part of a version + component effectively truncates the string at that point. ``if(<variable|string> VERSION_GREATER <variable|string>)`` Component-wise integer version number comparison (version format is - ``major[.minor[.patch[.tweak]]]``). + ``major[.minor[.patch[.tweak]]]``, omitted components are treated as zero). + Any non-integer version component or non-integer trailing part of a version + component effectively truncates the string at that point. ``if(<variable|string> VERSION_EQUAL <variable|string>)`` Component-wise integer version number comparison (version format is - ``major[.minor[.patch[.tweak]]]``). + ``major[.minor[.patch[.tweak]]]``, omitted components are treated as zero). + Any non-integer version component or non-integer trailing part of a version + component effectively truncates the string at that point. ``if(<variable|string> VERSION_LESS_EQUAL <variable|string>)`` Component-wise integer version number comparison (version format is - ``major[.minor[.patch[.tweak]]]``). + ``major[.minor[.patch[.tweak]]]``, omitted components are treated as zero). + Any non-integer version component or non-integer trailing part of a version + component effectively truncates the string at that point. ``if(<variable|string> VERSION_GREATER_EQUAL <variable|string>)`` Component-wise integer version number comparison (version format is - ``major[.minor[.patch[.tweak]]]``). + ``major[.minor[.patch[.tweak]]]``, omitted components are treated as zero). + Any non-integer version component or non-integer trailing part of a version + component effectively truncates the string at that point. ``if(<variable|string> IN_LIST <variable>)`` True if the given element is contained in the named list variable. |