Skip to content

Commit 0c632bb

Browse files
committed
Runtimes: quote the path for module map files
The install path may contain spaces which will be processed improperly when wired through the dependency. Add quotes to handle such paths.
1 parent f8ab391 commit 0c632bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtimes/Core/SwiftShims/swift/shims/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ target_compile_definitions(swiftShims INTERFACE
3939
$<$<AND:$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>,$<COMPILE_LANGUAGE:C,CXX>>:SWIFT_STATIC_STDLIB>)
4040
target_compile_options(swiftShims INTERFACE
4141
"$<$<AND:$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xcc -DSWIFT_STATIC_STDLIB>"
42-
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/swift/shims/module.modulemap>>")
42+
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=\"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/swift/shims/module.modulemap>\">")
4343

4444
install(TARGETS swiftShims
4545
EXPORT SwiftCoreTargets

0 commit comments

Comments
 (0)