Skip to content

Commit 02b4b6e

Browse files
committed
build: allow building on Linux without Swift_FLAGS
When CMAKE_Swift_FLAGS is empty, the string substitution will be empty, resulting in insufficient parameters to the REPLACE operation. The quoting ensures that an empty string does not cause that failure.
1 parent 6a6b505 commit 02b4b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Tools/plutil/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target_link_libraries(plutil PRIVATE
88
if(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
99
target_link_options(plutil PRIVATE "SHELL:-no-toolchain-stdlib-rpath")
1010

11-
string(REPLACE " " ";" ARGS_LIST ${CMAKE_Swift_FLAGS})
11+
string(REPLACE " " ";" ARGS_LIST "${CMAKE_Swift_FLAGS}")
1212
execute_process(
1313
COMMAND ${CMAKE_Swift_COMPILER} ${ARGS_LIST} -print-target-info
1414
OUTPUT_VARIABLE output

0 commit comments

Comments
 (0)