Skip to content

Commit a86a5e0

Browse files
committed
Add swift-argument-parser to the cmake build
1 parent 7b00323 commit a86a5e0

File tree

6 files changed

+23
-3
lines changed

6 files changed

+23
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ endif()
4242
find_package(dispatch QUIET)
4343
find_package(Foundation QUIET)
4444
find_package(Yams CONFIG REQUIRED)
45+
find_package(ArgumentParser CONFIG REQUIRED)
4546

4647
add_subdirectory(Sources)
4748
add_subdirectory(cmake/modules)

Package.resolved

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@
55
"package": "swift-argument-parser",
66
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
77
"state": {
8+
<<<<<<< HEAD
89
"branch": null,
910
"revision": "15351c1cd009eba0b6e438bfef55ea9847a8dc4a",
1011
"version": "0.3.0"
12+
=======
13+
<<<<<<< HEAD
14+
"branch": "master",
15+
"revision": "15351c1cd009eba0b6e438bfef55ea9847a8dc4a",
16+
"version": null
17+
=======
18+
"branch": null,
19+
"revision": "223d62adc52d51669ae2ee19bdb8b7d9fd6fcd9c",
20+
"version": "0.0.6"
21+
>>>>>>> Add swift-argument-parser to the cmake build
22+
>>>>>>> Add swift-argument-parser to the cmake build
1123
}
1224
},
1325
{

Package.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ if ProcessInfo.processInfo.environment["SWIFT_DRIVER_LLBUILD_FWK"] == nil {
7474
if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
7575
package.dependencies += [
7676
.package(url: "https://github.com/apple/swift-tools-support-core.git", .branch("master")),
77+
<<<<<<< HEAD
7778
.package(url: "https://github.com/jpsim/Yams.git", .upToNextMinor(from: "4.0.0")),
7879
.package(url: "https://github.com/apple/swift-argument-parser.git", .exact("0.3.0"))
80+
=======
81+
.package(url: "https://github.com/jpsim/Yams.git", .branch("master")),
82+
.package(url: "https://github.com/apple/swift-argument-parser.git", .exact("0.0.6"))
83+
>>>>>>> Add swift-argument-parser to the cmake build
7984
]
8085
} else {
8186
package.dependencies += [

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ all with CMake:
4444
```
4545
cmake -B <llbuild-build-dir> -G Ninja <llbuild-source-dir> -DLLBUILD_SUPPORT_BINDINGS="Swift"
4646
```
47+
* [swift-argument-parser](https://github.com/apple/swift-argument-parser)
4748
* [Yams](https://github.com/jpsim/Yams)
4849

4950
Once those dependencies have built, build `swift-driver` itself:
5051
```
51-
cmake -B <swift-driver-build-dir> -G Ninja <swift-driver-source-dir> -DTSC_DIR=<swift-tools-support-core-build-dir>/cmake/modules -DLLBuild_DIR=<llbuild-build-dir>/cmake/modules -DYams_DIR=<yamls-build-dir>/cmake/modules
52+
cmake -B <swift-driver-build-dir> -G Ninja <swift-driver-source-dir> -DTSC_DIR=<swift-tools-support-core-build-dir>/cmake/modules -DLLBuild_DIR=<llbuild-build-dir>/cmake/modules -DYams_DIR=<yamls-build-dir>/cmake/modules -DArgumentParser_DIR=<swift-argument-parser-build-dir>
5253
cmake --build <swift-driver-build-dir>
5354
```
5455

Sources/swift-help/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
add_executable(swift-help
1010
main.swift)
1111
target_link_libraries(swift-help PUBLIC
12-
SwiftOptions)
12+
SwiftOptions
13+
ArgumentParser)
1314

Sources/swift-help/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import SwiftOptions
1313
import ArgumentParser
1414

15-
extension DriverKind: ExpressibleByArgument, Decodable {}
15+
extension DriverKind: ExpressibleByArgument {}
1616

1717
struct SwiftHelp: ParsableCommand {
1818
@ArgumentParser.Option(name: .customLong("tool", withSingleDash: true),

0 commit comments

Comments
 (0)