mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-10 07:40:03 -06:00
Tests: Fix RunCMake.CommandLine test in unusual environments
Modify `Tests/RunCMake/CommandLine/P_working-dir.cmake` to not spuriously fail in environments when the build directory's nominal path is not canonicalized (i.e. `realpath(BINDIR) != BINDIR`).
This commit is contained in:
committed by
Brad King
parent
83686df1d6
commit
7b62e40a64
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user