Skip to content

Commit 3829a54

Browse files
authored
Merge pull request #435 from tristanlabelle/escape-CMAKE_Swift_FLAGS
Escape CMAKE_Swift_FLAGS to preserve Windows path separators when running tests
2 parents fae20a5 + 6a0ea0c commit 3829a54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if(ENABLE_TESTING)
9595

9696
find_package(Python3 COMPONENTS Interpreter REQUIRED)
9797

98+
string(REPLACE "\\" "\\\\" CMAKE_Swift_FLAGS_ESCAPED ${CMAKE_Swift_FLAGS})
9899
add_custom_target(check-xctest
99100
COMMAND
100101
${CMAKE_COMMAND} -E env
@@ -104,7 +105,7 @@ if(ENABLE_TESTING)
104105
LIBDISPATCH_BUILD_DIR=${XCTEST_PATH_TO_LIBDISPATCH_BUILD}
105106
LIBDISPATCH_OVERLAY_DIR=${XCTEST_PATH_TO_LIBDISPATCH_BUILD}/src/swift
106107
SWIFT_EXEC=${CMAKE_Swift_COMPILER}
107-
SWIFT_FLAGS=${CMAKE_Swift_FLAGS}
108+
SWIFT_FLAGS=${CMAKE_Swift_FLAGS_ESCAPED}
108109
$<TARGET_FILE:Python3::Interpreter> ${LIT_COMMAND} -sv ${CMAKE_SOURCE_DIR}/Tests/Functional
109110
COMMENT
110111
"Running XCTest functional test suite"

0 commit comments

Comments
 (0)