Skip to content
Snippets Groups Projects
Commit a7ad3a5f authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'help-cmake_path-IS_PREFIX' into release-3.20


e49cbf1d Help: cmake_path: fix erroneous example for IS_PREFIX

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6223
parents 43c42e12 e49cbf1d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment