File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
- add_custom_target ( diagnostic-database )
1
+ set ( diagnostic_witness " ${CMAKE_BINARY_DIR} /share/swift/diagnostics/generated" )
2
2
3
- add_custom_command (TARGET diagnostic-database
3
+ add_custom_command (
4
+ OUTPUT
5
+ ${diagnostic_witness}
4
6
COMMAND
5
7
${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} /diagnostics/ ${CMAKE_BINARY_DIR} /share/swift/diagnostics/
6
8
COMMAND
@@ -10,11 +12,17 @@ add_custom_command(TARGET diagnostic-database
10
12
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /swift-serialize-diagnostics"
11
13
--input-file-path ${CMAKE_BINARY_DIR} /share/swift/diagnostics/en.yaml
12
14
--output-directory ${CMAKE_BINARY_DIR} /share/swift/diagnostics/
15
+ COMMAND
16
+ ${CMAKE_COMMAND} -E touch ${diagnostic_witness}
17
+ DEPENDS
18
+ swift-def-to-yaml-converter
19
+ swift-serialize-diagnostics
20
+ # Add files in diagnostics subdirectory when they're created
13
21
)
14
22
23
+ add_custom_target (diagnostic-database DEPENDS ${diagnostic_witness} )
24
+
15
25
add_dependencies (swift-frontend diagnostic-database )
16
- add_dependencies (diagnostic-database swift-serialize-diagnostics )
17
- add_dependencies (diagnostic-database swift-def-to-yaml-converter )
18
26
19
27
swift_install_in_component (
20
28
DIRECTORY ${CMAKE_BINARY_DIR} /share/swift/diagnostics/
You can’t perform that action at this time.
0 commit comments