You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adding PATCHES keyword.
* Formatting fix.
* Move cpm_add_patches() outside if/else scopes.
* cmake-format: add PATCHES to CPMAddPackage.
* Integration tests for PATCHES command.
* Use get_filename_component() in place of cmake_path() for use with all cmake versions 3.14 and above.
* Added an example and improved comment for cpm_add_patches.
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,7 @@ Afterwards, any targets defined in the dependency can be used directly.
67
67
CPMAddPackage(
68
68
NAME # The unique name of the dependency (should be the exported target's name)
69
69
VERSION # The minimum version of the dependency (optional, defaults to 0)
70
+
PATCHES # Patch files to be applied sequentially using patch and PATCH_OPTIONS (optional)
70
71
OPTIONS # Configuration options passed to the dependency (optional)
71
72
DOWNLOAD_ONLY # If set, the project is downloaded, but not configured (optional)
72
73
[...] # Origin parameters forwarded to FetchContent_Declare, see below
@@ -78,6 +79,8 @@ If `GIT_TAG` hasn't been explicitly specified it defaults to `v(VERSION)`, a com
78
79
On the other hand, if `VERSION` hasn't been explicitly specified, CPM can automatically identify the version from the git tag in some common cases.
79
80
`GIT_TAG` can also be set to a specific commit or a branch name such as `master`, however this isn't recommended, as such packages will only be updated when the cache is cleared.
80
81
82
+
`PATCHES` takes a list of patch files to apply sequentially. For a basic example, see [Highway](examples/highway/CMakeLists.txt).
83
+
81
84
If an additional optional parameter `EXCLUDE_FROM_ALL` is set to a truthy value, then any targets defined inside the dependency won't be built by default. See the [CMake docs](https://cmake.org/cmake/help/latest/prop_tgt/EXCLUDE_FROM_ALL.html) for details.
82
85
83
86
If an additional optional parameter `SYSTEM` is set to a truthy value, the SYSTEM directory property of the subdirectory added will be set to true.
0 commit comments