Skip to content

Commit e242d3e

Browse files
authored
build: account for spaces in the toolchain (#1030)
If the macro library path contains a space, the invocation will improperly truncate it. Account for this eventuality.
1 parent cf94bdc commit e242d3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ if(NOT SwiftTesting_MACRO_PATH)
9494
elseif(SwiftTesting_MACRO_PATH)
9595
if(SwiftTesting_MACRO_PATH MATCHES [[\.(dylib|so|dll)$]])
9696
message(STATUS "TestingMacros: ${SwiftTesting_MACRO_PATH} (shared library)")
97-
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-library ${SwiftTesting_MACRO_PATH}>")
97+
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-library \"${SwiftTesting_MACRO_PATH}\">")
9898
else()
9999
message(STATUS "TestingMacros: ${SwiftTesting_MACRO_PATH} (executable)")
100-
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-executable ${SwiftTesting_MACRO_PATH}#TestingMacros>")
100+
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:SHELL:-load-plugin-executable \"${SwiftTesting_MACRO_PATH}#TestingMacros\">")
101101
endif()
102102
endif()
103103

0 commit comments

Comments
 (0)