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

Add CPM cache expiration capabilities

ldrozdz93 opened this issue · comments

Do I understand correctly, that once sources are downloaded do the cache directory, cpm would never delete them?

Suppose I want to use a CPM cache directory on a jenkins worker to speed up the builds in the pipeline (common cache shared between docker builds).
As the package versions are updated, old sources would persist on the host disk, growing indefinitely.

  1. Is my reasoning correct?
  2. Is there any suggested practice on how to prevent cache from growing indefinitely?

Hey, thanks for the issue! Yes your reasoning is correct, any dependencies downloaded to a persisted cache will remain there until the cache is removed. Currently there isn't a good mechanism for removing unused cache items besides removing the whole cache directory once it becomes too large.