diff options
author | Brad King <brad.king@kitware.com> | 2018-09-18 15:16:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-09-18 15:16:09 (GMT) |
commit | 7adf3aabd55dd80784727a229a37c394740db628 (patch) | |
tree | 6e70b3842db91f4de34dbb65a630385738dd9f6f | |
parent | f9eac2ae4b986f74a97fe16fa19df94331a52b34 (diff) | |
parent | 2a2f0ac231fe31052c6fabc2b2829653c5cea2fa (diff) | |
download | CMake-7adf3aabd55dd80784727a229a37c394740db628.zip CMake-7adf3aabd55dd80784727a229a37c394740db628.tar.gz CMake-7adf3aabd55dd80784727a229a37c394740db628.tar.bz2 |
Merge topic 'if-version-docs'
2a2f0ac231 Help: Clarify handling of non-integer components in if() version tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2393
-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. |