apple / apple/swift-argument-parser
Straightforward CMake build doesn't work on Mac and no instructions available.
- Dominant language
- Swift
- Stars
- 3.8k
- Forks
- 411
- Avg merge
- 7d 14h
- Merged PRs (30d)
- 15
Description
Why this matters: I want to submit PRs that make this project more consumable as a dependency of other CMake projects. Without a baseline understanding of what is expected to work, I can't test my changes.
**ArgumentParser version:** the `main` branch
**Swift version:** swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
### Checklist
- [x] If possible, I've reproduced the issue using the `main` branch of this package
- [x] I've searched for [existing GitHub issues](https://github.com/apple/swift-argument-parser/issues)
### Steps to Reproduce
```sh
cmake -GNinja -S . -B .cmake-build -DBUILD_TESTING=1 -DBUILD_EXAMPLES=1 &&
cmake --build .cmake-build &&
ctest -V --test-dir .cmake-build
```
### Expected behavior
Successful build and test.
### Actual behavior
```
/Users/dave/src/swift-project/swift-argument-parser/Sources/ArgumentParserTestHelpers/TestHelpers.swift:14:8: error: no such module 'XCTest'
import XCTest
^
/Users/dave/src/swift-project/swift-argument-parser/Sources/ArgumentParserTestHelpers/TestHelpers.swift:14:8: error: no such module 'XCTest'
import XCTest
^
```
Contributor guide
Research direction
Run the reported cmake and ctest commands on the main branch, then inspect the CMake configuration and Sources/ArgumentParserTestHelpers/TestHelpers.swift around the XCTest import. The work is complete when the documented straightforward CMake build succeeds on macOS and ctest passes, with instructions available for reproducing it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, swift
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100