Skip to content

Commit f327bf7

Browse files
committed
[CMake] Correct dependencies
HeaderDependencies.cpp and the stdlib filelist didn't have dependencies. That causes issues when the content is changed.
1 parent 66e4487 commit f327bf7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ else()
250250
")
251251
add_custom_command(
252252
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp"
253+
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp.tmp"
253254
COMMAND ${CMAKE_COMMAND} -E copy_if_different
254255
"${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp.tmp"
255256
"${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp"

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,8 @@ function(_compile_swift_files
978978
add_custom_command_target(unused_var
979979
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${file_path}.tmp" "${file_path}"
980980
CUSTOM_TARGET_NAME ${file_path_target}
981-
OUTPUT "${file_path}")
981+
OUTPUT "${file_path}"
982+
DEPENDS "${file_path}.tmp")
982983
endif()
983984

984985
# If this platform/architecture combo supports backward deployment to old

0 commit comments

Comments
 (0)