-
Notifications
You must be signed in to change notification settings - Fork 175
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
Conversation
There was a problem hiding this 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!
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. |
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did recently too: https://gitlab.kitware.com/cmake/cmake/-/issues/21847
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
OK. I added an explicit algorithm in README.md. We can document a default once it's confirmed in the CMake issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
Feature is live in v0.31.1 🎉 |
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