cpm-cmake / CPM.cmake

📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Use the git commit hash or tag as folder name.

Febbe opened this issue · comments

If a specific hash is provided with: #<hash> the foldername should be <hash>.
If a tag or version is provided, I would like to have the ability, to also have

  • <tag> for #<tag> and
  • v<version> for @<version>

The current used uid just hides this information without adding any benefit.

Currently the name of the cache directories comes from the hash of all arguments that get forwarded to FetchContent. This is because we want to differentiate between different sources, patch commands, clone depths etc. which would otherwise create conflicts and unexpected issues.

One solution would be to use nested directories, similar to the CPM_USE_NAMED_CACHE_DIRECTORIES option, perhaps it's possible to add similar behaviour there.