Skip to content

Commit 2562afa

Browse files
authored
Merge pull request #63959 from bnbarham/more-workarounds
[CMake] Workaround stale object files causing rebuilds
2 parents dc85cb0 + 50fb165 commit 2562afa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/ASTGen/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ if (SWIFT_SWIFT_PARSER)
8585
endforeach()
8686
endfunction()
8787

88+
# Workaround to touch the library and its objects so that we don't continually rebuild (again, see
89+
# corresponding change in swift-syntax).
90+
add_custom_command(
91+
TARGET swiftASTGen
92+
POST_BUILD
93+
COMMAND "${CMAKE_COMMAND}" -E touch_nocreate $<TARGET_FILE:swiftASTGen> $<TARGET_OBJECTS:swiftASTGen>
94+
COMMAND_EXPAND_LISTS
95+
COMMENT "Update mtime of library outputs workaround")
96+
8897
set(SWIFT_SYNTAX_MODULES
8998
SwiftBasicFormat
9099
SwiftParser

0 commit comments

Comments
 (0)