Merge topic 'doc-if-path'

3530eef3fb Help: Clarify that if(PATH_EQUAL) does not access the filesystem

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Marc Chevrier <marc.chevrier@gmail.com>
Merge-request: !10001
This commit is contained in:
Brad King
2024-11-20 14:25:09 +00:00
committed by Kitware Robot
+7 -5
View File
@@ -390,11 +390,13 @@ Path Comparisons
.. versionadded:: 3.24
Compares the two paths component-by-component. Only if every component of
both paths match will the two paths compare equal. Multiple path separators
are effectively collapsed into a single separator, but note that backslashes
are not converted to forward slashes. No other
:ref:`path normalization <Normalization>` is performed.
Lexicographically compares two CMake paths component-by-component without
accessing the filesystem. Only if every component of both paths match will
the two paths compare equal. Multiple path separators are effectively
collapsed into a single separator, but note that backslashes are not
converted to forward slashes.
No other :ref:`path normalization <Normalization>` is performed.
Trailing slashes are preserved, thus ``/a/b`` and ``/a/b/`` are not equal.
Component-wise comparison is superior to string-based comparison due to the
handling of multiple path separators. In the following example, the