You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.9 KiB
54 lines
1.9 KiB
|
|
include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
|
|
unset (errors)
|
|
|
|
|
|
cmake_path(SET reference "/x/y/z/../../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,/x/y/z/../../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
cmake_path(SET reference NORMALIZE "/x/y/z/../../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,NORMALIZE,/x/y/z/../../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
|
|
if (WIN32)
|
|
cmake_path(SET reference "/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
cmake_path(SET reference NORMALIZE "/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,NORMALIZE,/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
|
|
cmake_path(SET reference "//?/c:/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,//?/c:/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
cmake_path(SET reference NORMALIZE "//?/c:/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,NORMALIZE,//?/c:/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
|
|
cmake_path(SET reference "\\\\?\\UNC/host/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,\\?\UNC/host/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
cmake_path(SET reference NORMALIZE "\\\\?\\UNC\\host/x\\y/z\\..\\../a/d")
|
|
set(output "$<PATH:CMAKE_PATH,NORMALIZE,\\?\UNC/host/x\y/z\..\../a/d>")
|
|
if (NOT output STREQUAL reference)
|
|
list (APPEND errors "'${output}' instead of '${reference}'")
|
|
endif()
|
|
endif()
|
|
|
|
|
|
check_errors("PATH:CMAKE_PATH" ${errors})
|