Skip to content

Releases: cpm-cmake/CPM.cmake

Add NO_CACHE option

04 Jun 12:23
139d3ca
Compare
Choose a tag to compare

Allows overriding the CPM_SOURCE_CACHE per package. This is useful for packages that modify their source directory.

Prevent overriding declarations

29 May 14:09
b31063d
Compare
Choose a tag to compare

Fixes an issue where a dependency's package lock could override outer declarations.

Add FORCE parameter

29 May 13:39
4425bd3
Compare
Choose a tag to compare

Adds an optional FORCE parameter used internally to override any external package origin settings.
Allows package lock / declarations to be used with local overrides.

Add option for local package override

29 May 07:59
54a2d80
Compare
Choose a tag to compare

Adds the option to override a dependency per-build through a CMake argument.

Library developers are often in the situation where they work on a locally checked out dependency at the same time as on a consumer. It is now possible to override the consumer's dependency version with the local one by supplying the CMake option CPM_<dependency name>_SOURCE to the build. For example, to use the local version of Dep at the absolute path /path/to/dep, the consumer can be built with cmake -H. -Bbuild -DCPM_Dep_SOURCE=/path/to/dep.

Omit unversioned and local dependencies in package lock

28 May 11:29
829262c
Compare
Choose a tag to compare

This patch prevents local paths leaking into the package lock and omits dependencies without version information.

Add Package Lock

27 May 17:09
4aeea1d
Compare
Choose a tag to compare

The package lock makes it easier to manage and override transitive dependencies. When using a package lock file, dependencies can be updated without modifying the main or other project's CMakeLists.txt.

Usage

After including CPM.cmake, call CPMUsePackageLock(package-lock.cmake) to include package-lock.cmake, if it exists. This file can be created and updated using the new target cpm-update-package-lock. Note that it should be added to version control.

More info can be found in the wiki.

Fix regex path check and download only option in CPMFindPackage

19 May 18:50
5836544
Compare
Choose a tag to compare

CPMFindPackage fix

07 May 21:55
6f05390
Compare
Choose a tag to compare
  • CPMFindPackage no longer overwrites version info if the package has already been added before.

Fix DOWNLOAD_ONLY

29 Apr 10:43
3fff3ca
Compare
Choose a tag to compare

Packages with the DOWNLOAD_ONLY flag set no longer error when the source directory is already populated.

Create CMake modules for CPM packages

29 Apr 07:19
ca33abc
Compare
Choose a tag to compare

This allows find_package() to find previously added CPM.cmake modules.