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

Infer package name and version from URL #220

Merged
merged 10 commits into from
Feb 23, 2021
Merged

Conversation

iboB
Copy link
Member

@iboB iboB commented Feb 23, 2021

This is both for the single-argument syntax, and for the no-name-multi-argument syntax

Closes #208

Closes #181 unmerged. It's superseded by this

Copy link
Member

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, definitely awesome to support the shorthand syntax for URLs as well!

cmake/CPM.cmake Outdated Show resolved Hide resolved
Comment on lines +443 to +446
list(GET CPM_ARGS_URL 0 firstUrl)
cpm_package_name_and_ver_from_url(${firstUrl} nameFromUrl verFromUrl)
# If we fail to obtain name and version from the first URL, we could try other URLs if any.
# However multiple URLs are expected to be quite rare, so for now we won't bother.
Copy link
Member

Choose a reason for hiding this comment

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

TIL FetchContent supports multiple URLs 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

README.md Outdated Show resolved Hide resolved
iboB and others added 2 commits February 23, 2021 17:02
Co-authored-by: Lars Melchior <TheLartians@users.noreply.github.com>
Also added tests which include a hash algorithm provided
We can't document a default until it's confirmed here: https://gitlab.kitware.com/cmake/cmake/-/issues/21859
@iboB
Copy link
Member Author

iboB commented Feb 23, 2021

OK. I added an explicit algorithm in README.md. We can document a default once it's confirmed in the CMake issue.

Copy link
Member

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@TheLartians TheLartians merged commit a3d1048 into master Feb 23, 2021
@TheLartians TheLartians deleted the name-and-ver-from-url branch February 23, 2021 19:15
@TheLartians
Copy link
Member

Feature is live in v0.31.1 🎉

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.

Infer package name from URL
2 participants