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

Feature Request: Short syntax in long syntax. #553

Open
Richardk2n opened this issue Apr 2, 2024 · 1 comment
Open

Feature Request: Short syntax in long syntax. #553

Richardk2n opened this issue Apr 2, 2024 · 1 comment

Comments

@Richardk2n
Copy link

The short syntax is very useful, however sometimes I would like to set options.
An example:

CPMAddPackage(
	GITHUB_REPOSITORY gabime/spdlog
	VERSION 1.13.0
	EXCLUDE_FROM_ALL YES
	SYSTEM YES
	OPTIONS "SPDLOG_FMT_EXTERNAL ON"
)

Would it be possible to have this be equivalent to either something like this:

CPMAddPackage("gh:gabime/spdlog#v1.13.0" OPTIONS "SPDLOG_FMT_EXTERNAL ON")

or like this:

CPMAddPackage(URI "gh:gabime/spdlog#v1.13.0" OPTIONS "SPDLOG_FMT_EXTERNAL ON")

? (URI is a placeholder here, feel free to pick whatever)
If I understand your script this could be done by invoking the short syntax parser for a certain argument if more than 1 is given. This would be advantageous in the use case: I just want to add an option.

@TheLartians
Copy link
Member

Thanks for the issue! We feel the same way and have an in progress PR for it: #546.

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

No branches or pull requests

2 participants