From 3530eef3fb67176bbe69459e5865277dc9cdb8c8 Mon Sep 17 00:00:00 2001 From: scivision Date: Thu, 14 Nov 2024 16:22:38 -0500 Subject: [PATCH] Help: Clarify that if(PATH_EQUAL) does not access the filesystem Fixes: #26421 --- Help/command/if.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Help/command/if.rst b/Help/command/if.rst index 9eaf6da1bb..f0846f61eb 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -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 ` 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 ` 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