Skip to content

Feature Request: Short syntax in long syntax. #553

@Richardk2n

Description

@Richardk2n

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions