Skip to content

Commit 84a7882

Browse files
committed
build: add file dependencies for gyb
Add dependencies on the files for gyb to ensure that updates gyb are treated as triggers to regenerate the files. This is suspected to have caused issues for incremental builds.
1 parent 53055fa commit 84a7882

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ include(SwiftWindowsSupport)
55
include(SwiftAndroidSupport)
66

77
function(_swift_gyb_target_sources target scope)
8+
file(GLOB GYB_UNICODE_DATA ${SWIFT_SOURCE_DIR}/utils/UnicodeData/*)
9+
file(GLOB GYB_STDLIB_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_stdlib_support.py)
10+
file(GLOB GYB_SYNTAX_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/*)
11+
file(GLOB GYB_SOURCEKIT_SUPPORT ${SWIFT_SOURCE_DIR}/utils/gyb_sourcekit_support/*)
12+
set(GYB_SOURCES
13+
${SWIFT_SOURCE_DIR}/utils/GYBUnicodeDataUtils.py
14+
${SWIFT_SOURCE_DIR}/utils/SwiftIntTypes.py
15+
${GYB_UNICODE_DATA}
16+
${GYB_STDLIB_SUPPORT}
17+
${GYB_SYNTAX_SUPPORT}
18+
${GYB_SOURCEKIT_SUPPORT})
19+
820
foreach(source ${ARGN})
921
get_filename_component(generated ${source} NAME_WLE)
1022
get_filename_component(absolute ${source} REALPATH)
@@ -17,6 +29,7 @@ function(_swift_gyb_target_sources target scope)
1729
COMMAND
1830
${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_BINARY_DIR}/${generated}.tmp
1931
DEPENDS
32+
${GYB_SOURCES}
2033
${absolute})
2134
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${generated} PROPERTIES
2235
GENERATED TRUE)

0 commit comments

Comments
 (0)