File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed
tools/swift-swiftsyntax-test Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -2314,13 +2314,28 @@ macro(add_swift_lib_subdirectory name)
2314
2314
endmacro ()
2315
2315
2316
2316
function (add_swift_host_tool executable )
2317
+ set (ADDSWIFTHOSTTOOL_multiple_parameter_options
2318
+ SWIFT_COMPONENT
2319
+ COMPILE_FLAGS
2320
+ DEPENDS
2321
+ SWIFT_MODULE_DEPENDS )
2322
+
2317
2323
cmake_parse_arguments (
2318
2324
ADDSWIFTHOSTTOOL # prefix
2319
2325
"" # options
2320
2326
"" # single-value args
2321
- "SWIFT_COMPONENT;COMPILE_FLAGS;DEPENDS " # multi-value args
2327
+ "${ADDSWIFTHOSTTOOL_multiple_parameter_options} " # multi-value args
2322
2328
${ARGN} )
2323
2329
2330
+ # Configure variables for this subdirectory.
2331
+ set (VARIANT_SUFFIX "-${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK} _LIB_SUBDIR}-${SWIFT_HOST_VARIANT_ARCH} " )
2332
+ set (MODULE_VARIANT_SUFFIX "-swiftmodule${VARIANT_SUFFIX} " )
2333
+
2334
+ foreach (mod ${ADDSWIFTHOSTTOOL_SWIFT_MODULE_DEPENDS} )
2335
+ list (APPEND ADDSWIFTHOSTTOOL_DEPENDS "swift${mod}${MODULE_VARIANT_SUFFIX} " )
2336
+ list (APPEND ADDSWIFTHOSTTOOL_DEPENDS "swift${mod}${VARIANT_SUFFIX} " )
2337
+ endforeach ()
2338
+
2324
2339
# Create the executable rule.
2325
2340
add_swift_executable (
2326
2341
${executable}
Original file line number Diff line number Diff line change 1
- macro (add_swift_module_depends results target )
2
- list (APPEND ${results} "${target} -macosx" )
3
- list (APPEND ${results} "${target} -macosx-x86_64" )
4
- list (APPEND ${results} "${target} -swiftmodule-macosx-x86_64" )
5
- endmacro ()
6
-
7
- add_swift_module_depends (all_depends swiftTestUtils )
8
- add_swift_module_depends (all_depends swiftSwiftSyntax )
9
-
10
1
add_swift_host_tool (swift-swiftsyntax-test
11
2
main.swift
12
3
ClassifiedSyntaxTreePrinter.swift
13
4
empty.c # FIXME: If there is no C file in the target Xcode skips the linking phase and doesn't create the executable
14
5
COMPILE_FLAGS "-module-name" "main"
15
- DEPENDS ${all_depends}
6
+ SWIFT_MODULE_DEPENDS TestUtils SwiftSyntax
16
7
)
You can’t perform that action at this time.
0 commit comments