1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00
Files
CMake/Tests/RunCMake/cmake_path/CONCAT.cmake
2020-09-06 10:52:25 +02:00

21 lines
515 B
CMake

include ("${RunCMake_SOURCE_DIR}/check_errors.cmake")
unset (errors)
set (path "/a/b")
cmake_path (CONCAT path "cd")
if (NOT path STREQUAL "/a/bcd")
list (APPEND errors "'${path}' instead of 'a/bcd'")
endif()
set (path "/a/b")
cmake_path (CONCAT path "cd" "ef" OUTPUT_VARIABLE output)
if (NOT path STREQUAL "/a/b")
list (APPEND errors "input changed unexpectedly")
endif()
if (NOT output STREQUAL "/a/bcdef")
list (APPEND errors "'${output}' instead of 'a/bcdef'")
endif()
check_errors (CONCAT ${errors})