Skip to content

Commit ec96b4d

Browse files
committed
[CMake] Split 'touch' workaround into two commands
Workaround for Windows command line length limitation
1 parent ef8bb05 commit ec96b4d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmake/modules/AddSwiftHostLibrary.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,15 @@ function(add_swift_syntax_library name)
9292
add_custom_command(
9393
TARGET ${target}
9494
POST_BUILD
95-
COMMAND "${CMAKE_COMMAND}" -E touch_nocreate $<TARGET_FILE:${target}> $<TARGET_OBJECTS:${target}> "${module_base}"
95+
COMMAND "${CMAKE_COMMAND}" -E touch_nocreate $<TARGET_FILE:${target}> "${module_base}"
9696
COMMAND_EXPAND_LISTS
9797
COMMENT "Update mtime of library outputs workaround")
98+
add_custom_command(
99+
TARGET ${target}
100+
POST_BUILD
101+
COMMAND "${CMAKE_COMMAND}" -E touch_nocreate $<TARGET_OBJECTS:${target}>
102+
COMMAND_EXPAND_LISTS
103+
COMMENT "Update mtime of objcect files workaround")
98104

99105
set_target_properties(${target} PROPERTIES
100106
Swift_MODULE_NAME ${name}

0 commit comments

Comments
 (0)