📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
MIT License
Bot releases are hidden (Show)
Published by TheLartians almost 3 years ago
Fixes an issue where the DOWNLOAD_ONLY
flag is lost in combination with an overriding CPM_<Package>_SOURCE
flag.
Thanks to @hacker-cb for the fix!
Published by TheLartians almost 3 years ago
Fixed a problem that made passing lists as arguments impossible. Note that due to the way CMake handles parsing function arguments, separator semicolons of list arguments need to be quadruple escaped (\\\\;
). See #302 for details.
Published by TheLartians about 3 years ago
Adds an option to add an additional directory layer to the cache, allowing some IDEs to display the proper dependency name. See #266 for details. Thanks @pgorgon-hem for the feature!
Published by TheLartians about 3 years ago
CPM.cmake now emits a warning when a dependencies source directory has been modified (git dependencies only). See #274 for details.
Thanks @apGribble and @andijcr for the suggestion and implementation!
Published by TheLartians about 3 years ago
Thanks to @MixusMinimax and @OlivierLDff for finding and fixing the issues!
Published by TheLartians over 3 years ago
BITBUCKET_REPOSITORY
or using the bb:
prefix in the single-argument syntax. Thanks @pgorgon-hem for the PR!CMAKE_SOURCE_CACHE
will now work thanks to a fix by @studoot!Published by TheLartians over 3 years ago
Fixes an issue where a user-set FETCHCONTENT_BASE_DIR
would be ignored when adding a cached dependency.
Thanks to @trxcllnt for the fix!
Published by TheLartians over 3 years ago
Previously, function passed to a dependency were stored in the CMake cache. Following version 0.32.0, options are now scoped to the dependency and not leaked into the parent or CMake cache. This could potentially break projects, if relied on options entering the cache, however we assume that the change leads to a more predictable behaviour for almost all use cases. See #222 for a detailed discussion.
Additionally, the change means that we cannot (easily) check for option consistency, so the check has been disabled for now and is planned to be re-implemented in a further update.
Published by TheLartians over 3 years ago
Fixes a bug that prevented SOURCE_SUBDIR from working as expected.
Published by TheLartians over 3 years ago
The shorthand syntax now supports URL patterns, inferring name and version automatically. Hash validation is also supported. See the readme or #220 for details.
CPMAddPackage("https://example.com/my-package-1.2.3.zip#MD5=68e20f674a48be38d60e129f600faf7d")
Published by TheLartians over 3 years ago
Adds a new single-argument shorthand syntax for CPMAddPackage
, which tries to infer name, tag and version information from the provided argument string. See #205 and the readme for details.
CPMAddPackage(
NAME catch2
GITHUB_REPO catchorg/Catch2
VERSION 2.5.0
EXCLUDE_FROM_ALL YES
)
CPMAddPackage("gh:catchorg/[email protected]")
Published by TheLartians over 3 years ago
Now tries to infer the package name automatically from a given git repository URL. See #202 for details.
CPMAddPackage(
NAME Catch2
GITHUB_REPOSITORY catchorg/Catch2
VERSION 2.5.0
)
Is now equivalent to
CPMAddPackage(
GITHUB_REPOSITORY catchorg/Catch2
VERSION 2.5.0
)
Published by TheLartians over 3 years ago
This adds an optional parameter EXCLUDE_FROM_ALL
that prevents packages from leaking unwanted targets (such as tests, examples) to CPM.cmake projects. See #152 and #198 for details.
CPMAddPackage(
NAME googletest
GITHUB_REPOSITORY google/googletest
VERSION 1.8.0
GIT_TAG release-1.8.0
# prevent googletest targets from leaking into all
EXCLUDE_FROM_ALL YES
)
Published by TheLartians over 3 years ago
This adds an optional parameter EXCLUDE_FROM_ALL
that prevents packages from leaking unwanted targets (such as tests, examples) to CPM.cmake projects. This is a pre-release for testing the functionality. See #152 and #198 for details.
Published by TheLartians over 3 years ago
This should prevent packages from leaking unwanted targets (such as tests, examples) to CPM.cmake projects. This is a pre-release for testing the functionality. See #152 and #198 for details.
Published by TheLartians over 3 years ago
The CPM.cmake source code now resides at the brand new cpm-cmake
organisation. This will help the project grow by organising related projects and managing collaborators. This release updates related URLs in the CPM.cmake script.
Published by TheLartians over 3 years ago
Thanks to @ClausKlein and @xmuller for the PRs!
Published by TheLartians over 3 years ago
The package lock output is now prettified.
# cxxopts
CPMDeclarePackage(cxxopts "NAME;cxxopts;VERSION;2.2.0;GITHUB_REPOSITORY;jarro2783/cxxopts;OPTIONS;CXXOPTS_BUILD_EXAMPLES Off;CXXOPTS_BUILD_TESTS Off")
# cxxopts
CPMDeclarePackage(cxxopts
NAME cxxopts
VERSION 2.2.0
GITHUB_REPOSITORY jarro2783/cxxopts
OPTIONS
"CXXOPTS_BUILD_EXAMPLES Off"
"CXXOPTS_BUILD_TESTS Off"
)
Thanks to @alexandreSalconiDenis for the suggestion and PR!
Published by TheLartians over 3 years ago
Now supports non-absolute paths for CPM_SOURCE_CACHE
passed through configuration arguments, e.g. -DCPM_SOURCE_CACHE=~/some/path
.
See #186 for details.
Published by TheLartians over 3 years ago
We now bypass FetchContent for cached dependencies, resulting in a substantial performance improvement per added dependency.