Tags: cpm-cmake/CPM.cmake
Tags
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]>
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
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]>
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]>
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]>
PreviousNext