Browse Source

Tests: Fix CMakePresets test in unusual environments

Tweak test in RunCMake/CMakePresets/GoodNoSCache.cmake to use the
canonical directory for comparison. This avoids an effectively spurious
test failure if the overall CMake build directory is a symlink.
Matthew Woehlke 3 years ago
parent
commit
ef0cd3dc40
1 changed files with 1 additions and 0 deletions
  1. 1 0
      Tests/RunCMake/CMakePresets/GoodNoSCache.cmake

+ 1 - 0
Tests/RunCMake/CMakePresets/GoodNoSCache.cmake

@@ -1,4 +1,5 @@
 include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
 
 get_filename_component(_parent "${CMAKE_SOURCE_DIR}" DIRECTORY)
+file(REAL_PATH "${_parent}" _parent)
 test_variable(CMAKE_BINARY_DIR "" "${_parent}/GoodNoSCachePrep-build")