summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/cmake_path/HASH.cmake
blob: eb04f7f7e5c96fec264d3e63fd6c3ec105ffb750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)

set (path1 "a///b/c")
cmake_path(HASH path1 hash1)
set (path2 "a/b////c")
cmake_path(HASH path2 hash2)
if (NOT hash1 STREQUAL hash2)
  list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
endif()

set (path1 "a///b/c/../d")
cmake_path(HASH path1 hash1)
set (path2 "a/b////d")
cmake_path(HASH path2 hash2)
if (NOT hash1 STREQUAL hash2)
  list (APPEND errors "'hash values not equal for '${path1}' and '${path2}'")
endif()


check_errors (HASH ${errors})