Replies: 1 comment 1 reply
-
I think the best option to overcome this is simply to not use the I know it may seem ugly, but CPM is supposed to be a package manager. Think about it like pip or npm; you don't download them every time you initialize a new project, right? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our organization we are using CPM.cmake and we've ran into the situation where we pull a package with CPM.cmake, which also uses CPM.cmake to pull other packages.
Both get CPM using the
get_cpm.cmake
script.This works without any issue, but I did notice that it starts a new download if the
CPM_DOWNLOAD_VERSION
versions do not match.I think this can be improved, but I'm not sure what the best approach would be.
I think the
get_cpm.cmake
script should have a check that sees if CPM.cmake is already there and what version is there.In case it's an older version than the one it is configured to download (e.g.
if(CPM_VERSION VERSION_LESS CPM_DOWNLOAD_VERSION)
), it should probably at least issue a warning.If the versions are equal, or if the available version is newer, it should probably skip the download.
Like I said, for now it works without any issue, but it feels a bit dirty that there isn't any checks here.
I'm wondering what other's peoples thoughts on this are.
Beta Was this translation helpful? Give feedback.
All reactions