File tree Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Expand file tree Collapse file tree 2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change @@ -2322,26 +2322,26 @@ function(add_swift_host_tool executable)
2322
2322
"${ADDSWIFTHOSTTOOL_multiple_parameter_options} " # multi-value args
2323
2323
${ARGN} )
2324
2324
2325
+ precondition (ADDSWIFTHOSTTOOL_SWIFT_COMPONENT
2326
+ MESSAGE "Swift Component is required to add a host tool" )
2327
+
2325
2328
# Create the executable rule.
2326
2329
add_swift_executable (
2327
2330
${executable}
2328
2331
${ADDSWIFTHOSTTOOL_UNPARSED_ARGUMENTS}
2329
2332
)
2330
2333
2331
- # And then create the install rule if we are asked to.
2332
- if (ADDSWIFTHOSTTOOL_SWIFT_COMPONENT )
2333
- swift_install_in_component (${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2334
- TARGETS ${executable}
2335
- RUNTIME DESTINATION bin )
2334
+ swift_install_in_component (${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2335
+ TARGETS ${executable}
2336
+ RUNTIME DESTINATION bin )
2336
2337
2337
- swift_is_installing_component (${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2338
- is_installing )
2339
-
2340
- if (NOT is_installing )
2341
- set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable} )
2342
- else ()
2343
- set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${executable} )
2344
- endif ()
2338
+ swift_is_installing_component (${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2339
+ is_installing )
2340
+
2341
+ if (NOT is_installing )
2342
+ set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable} )
2343
+ else ()
2344
+ set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${executable} )
2345
2345
endif ()
2346
2346
endfunction ()
2347
2347
Original file line number Diff line number Diff line change 1
1
add_swift_host_tool (swift-stdlib-tool
2
- swift-stdlib-tool.mm )
2
+ swift-stdlib-tool.mm
3
+ SWIFT_COMPONENT compiler )
3
4
4
5
find_library (FOUNDATION NAMES Foundation )
5
6
target_link_libraries (swift-stdlib-tool PRIVATE ${FOUNDATION} )
6
-
7
- swift_install_in_component (compiler
8
- TARGETS swift-stdlib-tool
9
- RUNTIME DESTINATION "bin" )
10
-
You can’t perform that action at this time.
0 commit comments