You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Packages not using v-prefixed tags require specifying GIT_TAG explicitly and additionally to VERSION, which I agree isn't optimal. I think it makes sense to assume the v-prefix by default as it seems to be most common convention on GitHub, but also to provide an option to override this on a per-package basis.
Maybe we should add an option VERSION_PREFIX to the package definition to avoid the duplicate version specification. e.g.
CPMAddPackage(
NAME fmt
VERSION 6.1.2
GITHUB_REPOSITORY fmtlib/fmt
VERSION_PREFIX ""
)
As it turns out, CMake did not support empty arguments until very recently, which is why using VERSION_PREFIX "" will not work. Currently however CPM can take the version from GIT_TAG as well, reducing the need for double specification as well. So the current "correct" way to add fmt would be the following.
CPMAddPackage(
NAME fmt
GIT_TAG 6.1.2 # CPM can detect the version from this tag
GITHUB_REPOSITORY fmtlib/fmt
)
I will update the documentation and add fmt as an example accordingly.
the tag of fmt has no v prefix
default strategy will add v prefix to VERSION supplying by user.
should we give an option to handle this situation as well as VERSION equal master?
The text was updated successfully, but these errors were encountered: