summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-13 13:48:02 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-13 13:48:22 (GMT)
commit964492e663de2624e48d462f912ffa83cc6d277d (patch)
tree374bd80729ffe3694644698d60a402600d7c0bd5
parent4aeb887c823e1a5d846c58ff9483457d28f30c1b (diff)
parent7b62e40a64537dcfd5a3f93cb40282119aebbe7a (diff)
downloadCMake-964492e663de2624e48d462f912ffa83cc6d277d.zip
CMake-964492e663de2624e48d462f912ffa83cc6d277d.tar.gz
CMake-964492e663de2624e48d462f912ffa83cc6d277d.tar.bz2
Merge topic 'fix-commandline-test-with-symlinks'
7b62e40a64 Tests: Fix RunCMake.CommandLine test in unusual environments Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7660
-rw-r--r--Tests/RunCMake/CommandLine/P_working-dir.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/RunCMake/CommandLine/P_working-dir.cmake b/Tests/RunCMake/CommandLine/P_working-dir.cmake
index 4ea0293..e2c0378 100644
--- a/Tests/RunCMake/CommandLine/P_working-dir.cmake
+++ b/Tests/RunCMake/CommandLine/P_working-dir.cmake
@@ -9,6 +9,11 @@ foreach(d CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR CMAKE_SOURCE_DIR CMAKE_CURRE
if(EXPECTED_WORKING_DIR STREQUAL "${${d}}")
message(STATUS "${d} is the expected working directory (${EXPECTED_WORKING_DIR})")
else()
- message(FATAL_ERROR "${d} = \"${${d}}\" is not the expected working directory (${EXPECTED_WORKING_DIR})")
+ get_filename_component(resolved "${EXPECTED_WORKING_DIR}" REALPATH)
+ if(resolved STREQUAL "${${d}}")
+ message(STATUS "${d} is the expected working directory (${resolved}) after symlink resolution")
+ else()
+ message(FATAL_ERROR "${d} = \"${${d}}\" is not the expected working directory (${EXPECTED_WORKING_DIR})")
+ endif()
endif()
endforeach()