Skip to content

[FEA] Make version optional in rapids_cpm_find() and friends #938

Description

@Jacobfaib

Is your feature request related to a problem? Please describe.

I would like to be able to find a package and not care about what version is found. find_package() allows you to omit specifying a version, as does CPM. rapids_cpm_find() requires that a version be passed in.

Describe the solution you'd like

Either some kind of DONT_CARE option:

rapids_cpm_find(Foo /* version = */DONT_CARE)

or perhaps add special meaning to specific versions. CPM does this, for example: when passing VERSION 0, to CPMAddPackage() it is equivalent to omitting the version entirely:

rapids_cpm_find(Foo /* version = */ 0)
# or
rapids_cpm_find(Foo /* version = */ 0.0.0)

Describe alternatives you've considered

You can get the same effect today by passing in 0.0.0 to rapids_cpm_find(), but then you get somewhat weird output in the logs:

...
... Adding Foo@0.0.0 (<SHA>)
...

If there were first-class support for this, perhaps rapids-cmake could print a nicer message here ("Adding Foo@<actual detected version> (<SHA>)")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions