Skip to content

Commit f81aec0

Browse files
committed
build: canonicalise source path before use (NFC)
If the source tree is checked out into a patch behind a symlink, the path can get expanded and fail tests. Be more resilient by canonicalise the path prior to use.
1 parent 77a79f2 commit f81aec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ else()
497497
swift_common_unified_build_config(SWIFT)
498498
endif()
499499

500-
set(SWIFT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
500+
get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
501501
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
502502
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
503503
set(SWIFT_MAIN_INCLUDE_DIR "${SWIFT_SOURCE_DIR}/include")

0 commit comments

Comments
 (0)