CPM.cmake

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

MIT License

Stars
2.6K

Bot releases are hidden (Show)

CPM.cmake - Correctly infer version from GIT_TAG in CPMFindPackage

Published by TheLartians almost 4 years ago

CPM.cmake - Fix passing options when local source override

Published by TheLartians about 4 years ago

CPM.cmake - Add get_cpm.cmake

Published by TheLartians about 4 years ago

This is the official release of the get_cpm.cmake script, which will be the recommended way to get CPM.cmake. This will reduce the code impact of adding CPM.cmake and allow minimise the amount of third-party code in C++ projects. Thanks to @tueda for the suggestion of caching the download itself (#145).

CPM.cmake - Add on-demand download script

Published by TheLartians about 4 years ago

This release is to test the functionality introduced by #146.

CPM.cmake - First auto-versioned release

Published by TheLartians about 4 years ago

This release is to check that the auto-version feature of #139 works as intended.

CPM.cmake - Fix indeterminate command for GitLab argument

Published by TheLartians about 4 years ago

Fixes use of the GITLAB_REPOSITORY argument. Relevant PR: #137.

CPM.cmake - Shallow fetch cached repositories

Published by TheLartians over 4 years ago

Cached dependencies are now fetched using --depth=1 by default, to minimise bandwidth and configure time. This does not apply when an explicit commit hash is provided.

See #129 and #130 for details and discussion.

CPM.cmake - Add NO_CACHE option

Published by TheLartians over 4 years ago

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

CPM.cmake - Prevent overriding declarations

Published by TheLartians over 4 years ago

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

CPM.cmake - Add FORCE parameter

Published by TheLartians over 4 years ago

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

CPM.cmake - Add option for local package override

Published by TheLartians over 4 years ago

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.

CPM.cmake - Omit unversioned and local dependencies in package lock

Published by TheLartians over 4 years ago

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

CPM.cmake - Add Package Lock

Published by TheLartians over 4 years ago

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.

CPM.cmake - Fix regex path check and download only option in CPMFindPackage

Published by TheLartians over 4 years ago

Relevant Issues / PRs: #116, #119

CPM.cmake - CPMFindPackage fix

Published by TheLartians over 4 years ago

  • CPMFindPackage no longer overwrites version info if the package has already been added before.
CPM.cmake - Fix DOWNLOAD_ONLY

Published by TheLartians over 4 years ago

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

CPM.cmake - Create CMake modules for CPM packages

Published by TheLartians over 4 years ago

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

CPM.cmake - source cache fixes

Published by TheLartians over 4 years ago

CPM_SOURCE_CACHE should now work offline again and on windows.

CPM.cmake -

Published by TheLartians over 4 years ago

CPM.cmake - First version using GitHub releases

Published by TheLartians over 4 years ago

From now on, the most recent version of CPM can be downloaded from the according GitHub release as opposed to pulling it from the master branch.