summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2021-06-12 09:23:47 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2021-06-12 09:23:47 (GMT)
commit4665d1e69ad07b9c147db5b6e140235ea2f5ab9d (patch)
treebaac39ff843c3d7f8a23600ad414ee14835862f3 /Help
parent8a4f3fd8611b9ea3b18d4f74c42d071f10d306a7 (diff)
downloadCMake-4665d1e69ad07b9c147db5b6e140235ea2f5ab9d.zip
CMake-4665d1e69ad07b9c147db5b6e140235ea2f5ab9d.tar.gz
CMake-4665d1e69ad07b9c147db5b6e140235ea2f5ab9d.tar.bz2
Help: cmake_path: fix erroneous example for IS_PREFIX
Fixes: #22302
Diffstat (limited to 'Help')
-rw-r--r--Help/command/cmake_path.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Help/command/cmake_path.rst b/Help/command/cmake_path.rst
index 193180d..565a37b 100644
--- a/Help/command/cmake_path.rst
+++ b/Help/command/cmake_path.rst
@@ -459,9 +459,10 @@ are :ref:`normalized <Normalization>` before the check.
.. code-block:: cmake
- set(path "/a/b/c/d")
- cmake_path(IS_PREFIX path "/a/b" result) # result = true
- cmake_path(IS_PREFIX path "/x/y/z" result) # result = false
+ set(path "/a/b/c")
+ cmake_path(IS_PREFIX path "/a/b/c/d" result) # result = true
+ cmake_path(IS_PREFIX path "/a/b" result) # result = false
+ cmake_path(IS_PREFIX path "/x/y/z" result) # result = false
set(path "/a/b")
cmake_path(IS_PREFIX path "/a/c/../b" NORMALIZE result) # result = true