Skip to content

Commit 11c0316

Browse files
authored
Merge pull request swiftlang#40912 from eeckstein/fix-swift-cmake
2 parents c1ea315 + 0d9b364 commit 11c0316

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ function(add_swift_compiler_modules_library name)
119119
if (dependencies)
120120
foreach(dep_module ${dependencies})
121121
if (DEFINED "${dep_module}_dep_target")
122-
list(APPEND deps "${${dep_module}_dep_target}")
122+
# We have to add the module target for the ordering dependency
123+
# and the output file for the file dependency (otherwise the dependent
124+
# module wouldn't be rebuilt if the current module changes)
125+
list(APPEND deps "${${dep_module}_dep_target}" "${build_dir}/${dep_module}.o")
123126
else()
124127
message(FATAL_ERROR "module dependency ${module} -> ${dep_module} not found. Make sure to add modules in dependency order")
125128
endif()

0 commit comments

Comments
 (0)