File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,17 @@ function(add_swift_host_library name)
3030 COMMAND "${CMAKE_COMMAND} " -E make_directory ${module_base}
3131 COMMENT "Generating module directory for ${name} " )
3232
33+ # Touch the library and objects to workaround their mtime not being updated
34+ # when there are no real changes (eg. a file was updated with a comment).
35+ # Ideally this should be done in the driver, which could only update the
36+ # files that have changed.
37+ add_custom_command (
38+ TARGET ${name}
39+ POST_BUILD
40+ COMMAND "${CMAKE_COMMAND} " -E touch_nocreate $<TARGET_FILE:${name} > $<TARGET_OBJECTS:${name} >
41+ COMMAND_EXPAND_LISTS
42+ COMMENT "Update mtime of library outputs workaround" )
43+
3344 # Install the Swift module into the appropriate location.
3445 set_target_properties (${name}
3546 PROPERTIES Swift_MODULE_DIRECTORY ${module_dir}
You can’t perform that action at this time.
0 commit comments