Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Straightforward CMake build doesn't work on Mac and no instructions available. #626

Open
2 tasks done
dabrahams opened this issue Mar 18, 2024 · 4 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@dabrahams
Copy link

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

  • If possible, I've reproduced the issue using the main branch of this package
  • I've searched for existing GitHub issues

Steps to Reproduce

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
       ^
@natecook1000
Copy link
Member

As currently configured, SwiftPM is the supported tool for building and running tests on the Mac. If there's a way to expand CMake support, that would be great to see!

@natecook1000 natecook1000 added the enhancement New feature or request label May 17, 2024
@dabrahams
Copy link
Author

To be clear, this is not a request to make the straightforward cmake build work; it's a request that someone (like whoever added the CMake "support", such as it is) describe the circumstances under which they expect it to work. Without such a description, "expanding CMake support" as you put it —which is what I am ultimately trying to do—is impossible because I can't know if any given change is breaking something important. "CMake isn't officially supported" may be true enough but it doesn't begin to address the issue.

@dabrahams
Copy link
Author

If there's a way to expand CMake support, that would be great to see!

@natecook1000 Maybe I should read this as, “whatever you, Dave, attest is improving CMake support, I'm likely to accept the PR unless it breaks our CI.” If that's what you mean, I don't need to worry about who else might be relying on the current CMake configuration. Is that the right interpretation?

@dabrahams
Copy link
Author

@natecook1000 Bump. It would be really good to get some clarity on this matter. I currently have 2 open issues and 2 open PRs related to CMake support. I want to know if I'm wasting my time submitting these, or if there's some way to move them forward. /cc @compnerd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants