Skip to content

Commit b3d6473

Browse files
authored
Merge pull request swiftlang#21626 from compnerd/patterns
2 parents 4544476 + 46ec2cf commit b3d6473

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,31 +2330,28 @@ macro(add_swift_lib_subdirectory name)
23302330
endmacro()
23312331

23322332
function(add_swift_host_tool executable)
2333-
set(ADDSWIFTHOSTTOOL_multiple_parameter_options
2334-
SWIFT_COMPONENT)
2335-
2336-
cmake_parse_arguments(
2337-
ADDSWIFTHOSTTOOL # prefix
2338-
"" # options
2339-
"" # single-value args
2340-
"${ADDSWIFTHOSTTOOL_multiple_parameter_options}" # multi-value args
2341-
${ARGN})
2333+
set(options)
2334+
set(single_parameter_options SWIFT_COMPONENT)
2335+
set(multiple_parameter_options)
2336+
2337+
cmake_parse_arguments(ASHT
2338+
"${options}"
2339+
"${single_parameter_options}"
2340+
"${multiple_parameter_options}"
2341+
${ARGN})
23422342

2343-
precondition(ADDSWIFTHOSTTOOL_SWIFT_COMPONENT
2343+
precondition(ASHT_SWIFT_COMPONENT
23442344
MESSAGE "Swift Component is required to add a host tool")
23452345

23462346
# Create the executable rule.
2347-
add_swift_executable(
2348-
${executable}
2349-
${ADDSWIFTHOSTTOOL_UNPARSED_ARGUMENTS}
2350-
)
2347+
add_swift_executable(${executable}
2348+
${ASHT_UNPARSED_ARGUMENTS})
23512349

2352-
swift_install_in_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2350+
swift_install_in_component(${ASHT_SWIFT_COMPONENT}
23532351
TARGETS ${executable}
23542352
RUNTIME DESTINATION bin)
23552353

2356-
swift_is_installing_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
2357-
is_installing)
2354+
swift_is_installing_component(${ASHT_SWIFT_COMPONENT} is_installing)
23582355

23592356
if(NOT is_installing)
23602357
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable})

0 commit comments

Comments
 (0)