File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -921,7 +921,10 @@ function(_compile_swift_files
921
921
string (REPLACE ";" "'\n '" source_files_quoted "${source_files} " )
922
922
string (SHA1 file_name "'${source_files_quoted} '" )
923
923
set (file_path "${CMAKE_CURRENT_BINARY_DIR} /${file_name} .txt" )
924
- file (WRITE "${file_path} " "'${source_files_quoted} '" )
924
+ file (WRITE "${file_path} .tmp" "'${source_files_quoted} '" )
925
+ add_custom_command (
926
+ OUTPUT "${file_path} "
927
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different "${file_path} .tmp" "${file_path} " )
925
928
926
929
# If this platform/architecture combo supports backward deployment to old
927
930
# Objective-C runtimes, we need to copy a YAML file with legacy type layout
@@ -1001,7 +1004,9 @@ function(_compile_swift_files
1001
1004
if (SWIFTFILE_STATIC)
1002
1005
set (command_copy_interface_file)
1003
1006
if (interface_file)
1004
- set (command_copy_interface_file COMMAND "${CMAKE_COMMAND} " "-E" "copy" ${interface_file} ${interface_file_static} )
1007
+ set (command_copy_interface_file
1008
+ COMMAND "${CMAKE_COMMAND} " "-E" "copy" ${interface_file} ${interface_file_static}
1009
+ COMMAND "${CMAKE_COMMAND} " "-E" "copy" ${private_interface_file} ${private_interface_file_static} )
1005
1010
endif ()
1006
1011
add_custom_command_target(
1007
1012
module_dependency_target_static
Original file line number Diff line number Diff line change 2
2
# API Notes for the C++ Standard Library
3
3
#
4
4
set (output_dir "${SWIFTLIB_DIR} /apinotes" )
5
- add_custom_target (CxxStdlib-apinotes
5
+ add_custom_command_target(unused_var
6
+ CUSTOM_TARGET_NAME CxxStdlib-apinotes
6
7
COMMAND ${CMAKE_COMMAND} "-E" "make_directory" "${output_dir} "
7
8
COMMAND ${CMAKE_COMMAND} "-E" "copy_if_different" "${CMAKE_CURRENT_SOURCE_DIR} /std.apinotes" "${output_dir} "
8
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR} /std.apinotes
9
- COMMENT "Copying CxxStdlib API Notes to ${output_dir} " )
9
+ COMMENT "Copying CxxStdlib API Notes to ${output_dir} "
10
+ OUTPUT "${output_dir} /std.apinotes"
11
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /std.apinotes" )
10
12
11
13
swift_install_in_component(FILES std.apinotes
12
14
DESTINATION "lib/swift/apinotes"
You can’t perform that action at this time.
0 commit comments