Skip to content

Don't unconditionally download in get_cpm.cmake #554

Open
@genevieve-me

Description

@genevieve-me

The provided get_cpm.cmake template will always try to download from github:

file(DOWNLOAD

This causes builds to fail when run by a sandboxed builder. For example, I was hoping to package ada-url for nixpkgs, which uses your template verbatim, and had to patch it to not download if CPM_DOWNLOAD_LOCATION was set, eg:

-file(DOWNLOAD
+if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION}))
+  file(DOWNLOAD

Would you be open to making such a change upstream? Thanks!

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