Skip to content

Tags: cpm-cmake/CPM.cmake

Tags

v0.43.1

Toggle v0.43.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Use manually github workflow to create releases (#710)

* use manually github workflow to create releases

* ensure that release tags always start with 'v' and set pipefail

* better errror handling

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* push tag in the end only

* address review feedback

* pass variables through env

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

* get version directly from tag

* validate the branch explicitly

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

---------

Co-authored-by: Copilot Autofix powered by AI <[email protected]>

v0.43.0

Toggle v0.43.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Implement #406: CPM_<dependency>_SOURCE explicit->env fallback (#696)

* Reimplement #406 with cascading env overrides

* style: format package override env unit test

* style: align env override test with cmake-format layout

* style: apply cmake-format to env override unit test

* feat: warn when CPM_<name>_SOURCE override activates

Reviewer request: add a warning for any overridden dependencies to
minimise the risk of having unexpected dependency versions injected.

Both override paths now emit message(WARNING):
- ENV variable path: fires inside the ENV-fallback block when an
  environment variable activates the override
- CMake variable path: fires only when no ENV variable is active,
  avoiding a double-warn when ENV sets the CMake variable

Warning format matches CPM_INDENT prefix convention:
  "CPM: '<name>' version overridden by environment variable
   CPM_<name>_SOURCE='<path>'"

Unit tests updated to capture stderr and assert the expected warning
text is present for both override paths.

* style: apply cmake-format to warning messages

* style: apply cmake-format to package-override-env test

* style: apply cmake-format to package-override test

v0.42.3

Toggle v0.42.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Strip whitespace from OPTION_VALUE (fixes #635) (#657)

* Strip whitespace from OPTION_VALUE (fixes #635)

* update options test case to ensure multiple spaces are supported in options

---------

Co-authored-by: Dominique Würtz <[email protected]>
Co-authored-by: Lars Melchior <[email protected]>
Co-authored-by: Lars Melchior <[email protected]>

v0.42.2

Toggle v0.42.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Support .tar.xz and .tar.zst in tarball URLs, fix #536 (#694)

* Support .tar.xz and .tar.zst in tarball URLs, fix #536

* cmake-format

v0.42.1

Toggle v0.42.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix (#655)

v0.42.0

Toggle v0.42.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Implement #624: Use shorter hashes with CPM_SOURCE_CACHE (#631)

* Add ASSERT_CONTENTS_EQUAL test macro in testing.cmake

Checks if the contents of a file matches the given input

* Use shorter hashes with CPM_SOURCE_CACHE (#624)

Uses shorter hashes with CPM_SOURCE_CACHE. Falls back to a longer hash
if necessary (ie, if there's a collision with an existing hash).

See: #624

* Update integration tests to support shorter hashes

* trigger ci

* run cmake-format

* if already available, use the legacy cache hash

* create temporary file in current binary dir

* add test case for legacy hash

---------

Co-authored-by: Lars Melchior <[email protected]>
Co-authored-by: Lars Melchior <[email protected]>

v0.41.0

Toggle v0.41.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feature: allow URI to use shorthand syntax with additional options (#617

)

* feature: add URI to use shorthand syntax with additional options

This allows to combine the shorthand syntax with URI and additional arguments:
```
CPMAddPackage(URI "gh:nlohmann/[email protected]" OPTIONS "JSON_BUildTests OFF")
```

This is much shorter than the longer syntax way of writing:
```
CPMAddPackage(
  NAME nlohmann_json
  VERSION 3.9.1
  GITHUB_REPOSITORY nlohmann/json
  OPTIONS
    "JSON_BuildTests OFF"
)
```

* fix: use shorthand syntax in examples

* test: add test for shorthand syntax with options

* doc: extend README mentioning shorthand syntax with options

* feat: URI keyword also sets EXCLUDE_FROM AND SYSTEM

* doc: more explicit about the behavior of URI

* doc: adjust README accordingly to PR-Review

* test: fix inline documentation of test_simple

* move URI comment

* added new test for shorthand syntax

* reset simple test

* add that URI must be the first argument

---------

Co-authored-by: Lars Melchior <[email protected]>

v0.40.8

Toggle v0.40.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: do not generate module files with DOWNLOAD_ONLY (#654)

Co-authored-by: Avus <[email protected]>

v0.40.7

Toggle v0.40.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fetch content (#593)

* Add git_archival mechanism

* fetch_content

* Delete .pre-commit-config.yaml

* Update CPM.cmake

* cmake-format

v0.40.6

Toggle v0.40.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix version filename for find_package redirects (#630)

Co-authored-by: Lars Melchior <[email protected]>