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

[swift-inspect] use CMake FetchContent to fetch ArgumentParser when not provided #78827

Merged
merged 6 commits into from
Jan 28, 2025

Conversation

andrurogerz
Copy link
Contributor

@andrurogerz andrurogerz commented Jan 22, 2025

Purpose

Simplify CMake build of swift-inspect by using FetchContent to fetch and build swift-argument-parser when not provided manually via ArgumentParser_DIR=....

Overview

  • Replace CMake find_package with FetchContent with FIND_PACKAGE_ARGS, which will first try find_package as before but will fetch from remote if not provided
  • Specify swift-argument-parser v1.5.0 since it builds properly for Android
  • Update Packages.swift to also specify swift-argument-parser v1.5.0 for consistency
  • Update README to reflect the change

Validation

  • CMake build for Android arm64-v8a on Windows 11 with and without ArgumentParser_DIR
  • CMake build for Windows x64 on Windows 11 with and without ArgumentParser_DIR
  • CMake build for Linux x86_64 on Fedora 41 with and without ArgumentParser_DIR

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…perties
@andrurogerz andrurogerz marked this pull request as ready for review January 22, 2025 23:53
Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; we should check with @mikeash about bumping the s-a-p dependency.

@compnerd
Copy link
Member

@swift-ci please test

@compnerd compnerd merged commit 18fa490 into swiftlang:main Jan 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants