-
Notifications
You must be signed in to change notification settings - Fork 205
feature: allow URI to use shorthand syntax with additional options #617
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
Conversation
8686474
to
82b650b
Compare
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.
Hey, thanks a lot for this alternative implementation and thanks for your patience, as I'm quite busy these days! I personally much prefer this alternative to the other PR, as it looks much cleaner and is not mixing different ways to pass arguments (I know it's a common CMake style, so this is a very subjective take). I was hoping to hear some input from @iboB on this, but I think he is very busy as well.
Important difference to #546, it does not set EXCLUDE_FROM_ALL;YES;SYSTEM;YES;
Can you elaborate what the advantage is? I think I it would be intuitive for both CPMAddPackage("gh:nlohmann/[email protected]")
and CPMAddPackage(URI "gh:nlohmann/[email protected]")
to work the same way, so IMO both versions should set the same flags.
Sorry again for taking so long to respond. I have some more time during the holidays, so happy to help get this merged asap.
I think I found the answer in the other PR:
I see your concern, though I feel it's quite easy to understand in the docs:
|
PR #546 basic idea was, take the "short hand" syntax and allow extended options. I will adjust this PR accordingly |
82b650b
to
1cb8a5a
Compare
This new version automatically sets I added another note below the |
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 updates! I really like how it's turning out. There are some small stylistic and documentation issues left and then I'm happy to merge this!
Dear distinguished Gentleman, |
This allows to combine the shorthand syntax with URI and additional arguments: ``` CPMAddPackage(URI "gh:nlohmann/[email protected]" OPTIONS "JSON_BUildTests OFF") ``` This is much shorter than the longer syntax way of writing: ``` CPMAddPackage( NAME nlohmann_json VERSION 3.9.1 GITHUB_REPOSITORY nlohmann/json OPTIONS "JSON_BuildTests OFF" ) ```
32900e9
to
e372127
Compare
Thanks for the reminder! |
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 changes, I like how it turned out! As you've allowed maintainer commits and there's not much left I'll add the final touches mentioned below and merge once tests pass. :)
URI argument support is released in |
Yeah! Thank you!!! |
(This is an alternative to PR #546 )
This allows to combine the shorthand syntax by using URI with additional arguments:
This is much shorter than the longer syntax way of writing:
Important difference to #546, it does not setEXCLUDE_FROM_ALL;YES;SYSTEM;YES;