Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SGSSGene/CPM.cmake
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: cpm-cmake/CPM.cmake
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 19 commits
  • 30 files changed
  • 17 contributors

Commits on Apr 7, 2024

  1. Configuration menu
    Copy the full SHA
    0e450ef View commit details
    Browse the repository at this point in the history
  2. Use cpm_find_package to check if a package added (cpm-cmake#552)

    If I have a project, which has:
    
    1. /CMakeLists.txt:
    
       ```cmake
       cmake_minimum_required(VERSION 3.29)
       project(test)
       include(./cmake/CPM.cmake)
       add_subdirectory(subdir)
       cpmfindpackage(
         NAME
         nlohmann_json
         VERSION
         3.11.2
         URL
         "https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz"
         EXCLUDE_FROM_ALL
         ON)
    
       if(NOT TARGET nlohmann_json::nlohmann_json)
         message(FATAL_ERROR "BUG")
       endif()
       ```
    2. /subdir/CMakeLists.txt
    
       ```cmake
       cpmfindpackage(
         NAME
         nlohmann_json
         VERSION
         3.11.2
         URL
         "https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz"
         EXCLUDE_FROM_ALL
         ON)
       ```
    
    When nlohmann_json is first founded by find_package,
    CPM.cmake register this package and later call to CPMFindPackage will
    not actually perform a find_package again, which leads to this buggy
    behavior.
    
    As CPM write a FindXXX.cmake file for packages added by CPM to pervert
    find_package to get local package, I think directly use cpm_find_package
    to check if a package is already added is good enough.
    black-desk authored Apr 7, 2024
    Configuration menu
    Copy the full SHA
    7e81149 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. Add xxHash example (cpm-cmake#549)

    * Add xxHash example
    
    * Fix link error
    
    * run code formatters
    
    ---------
    
    Co-authored-by: Lars Melchior <[email protected]>
    RozeFound and TheLartians authored Apr 8, 2024
    Configuration menu
    Copy the full SHA
    c0855c9 View commit details
    Browse the repository at this point in the history
  2. Custom cache directory name (cpm-cmake#543)

    * Custom cache directory name
    
    Enable setting a custom directory name for cached packages.
    Required if e.g. patch_command uses external variables or
    just to set a human readable name.
    
    * fixup! review comment CUSTOM_CACHE_DIR -> CUSTOM_CACHE_KEY
    
    * run cmake-format
    
    ---------
    
    Co-authored-by: Olsson Gerhard <[email protected]>
    Co-authored-by: Lars Melchior <[email protected]>
    3 people authored Apr 8, 2024
    Configuration menu
    Copy the full SHA
    0370507 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2024

  1. Remove 'bug' from comment (cpm-cmake#555)

    * Remove 'bug' from comment
    
    * Fix the styling
    
    Oh gosh, I messed up the style...
    
    * Line endings
    PercentBoat4164 authored Apr 21, 2024
    Configuration menu
    Copy the full SHA
    76ca486 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Adding PATCHES keyword. (cpm-cmake#558)

    * 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.
    ScottBailey authored Jun 12, 2024
    Configuration menu
    Copy the full SHA
    d416d9b View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. replace deprecated calls to FetchContent_Populate (cpm-cmake#570)

    * replace deprecated calls to FetchContent_Populate
    
    The single argument signature for FetchContent_Populate is deprecated with CMake 3.30.
    It was used, in order to call add_subdirectory manually with the EXCLUDE_FROM_ALL and SYSTEM flags.
    These have been added to FetchContent_Declare with 3.25 and 3.28.
    Calling FetchContent_MakeAvailable will internally call add_subdirectory with EXCLUDE_FROM_ALL and SYSTEM.
    There is therefore no need to call this manually.
    
    * fix: OPTIONS passed to CPMAddPackage not set
    
    where previously parsed in cpm_add_subdirectory which is not called
    on the new code path.
    
    * refactor: remove an unnecessary else branch
    
    * ci: include cmake 3.30 in test matrix
    
    * fix: forward SOURCE_SUBDIR to FetchContent_Declare
    
    For CMake version <3.28 this is done by calling add_subdirectory manually.
    For newer version FetchContent_Declare/MakeAvailable handles this for us.
    
    * fix: only set options if download_only is false
    
    this replicates the old behaviour
    
    * fix: DOWNLOAD_ONLY test
    
    * refactor: always use *_Populate to reduce code paths
    
    * Revert "refactor: always use *_Populate to reduce code paths"
    
    This reverts commit 0e8ca2a.
    
    ---------
    
    Co-authored-by: Avus <[email protected]>
    Avus-c and Avus-c authored Jul 29, 2024
    Configuration menu
    Copy the full SHA
    8b67fe2 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2024

  1. Additional search path for patch.exe (cpm-cmake#581)

    * Additional search path for patch.exe
    
    * Style
    ScottBailey authored Aug 2, 2024
    Configuration menu
    Copy the full SHA
    0bc73f4 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2024

  1. Configuration menu
    Copy the full SHA
    9ddfe1b View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2024

  1. circumvent bug in cmake <3.30.3 (cpm-cmake#605)

    Co-authored-by: Avus <[email protected]>
    Avus-c and Avus-c authored Dec 22, 2024
    Configuration menu
    Copy the full SHA
    c3807eb View commit details
    Browse the repository at this point in the history
  2. Update boost to 1.86 (cpm-cmake#592)

    * Update to v1.85.0
    
    * Boost example to 1.86
    ScottBailey authored Dec 22, 2024
    Configuration menu
    Copy the full SHA
    22381df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a9e203 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2024

  1. Fix finding patch executable when cross-compiling on windows. (cpm-cm…

    …ake#627)
    
    `WIN32` checks whether current build context is windows. This is not correct in case of cross-compiling, because we are interested in finding host's tools, not SDK's tools.
    rokups authored Dec 29, 2024
    Configuration menu
    Copy the full SHA
    cd28d44 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2025

  1. Investigate sol2 CI build issue (cpm-cmake#648)

    * trigger CI to see if sol2 example is reliably failing
    
    * attempt patch from github comment
    
    * fix patch
    
    * add info to comment on patch
    
    * run fix-format
    
    * simplify patchfile
    TheLartians authored Mar 2, 2025
    Configuration menu
    Copy the full SHA
    4b3a60f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33efd5f View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2025

  1. Fetch content (cpm-cmake#593)

    * Add git_archival mechanism
    
    * fetch_content
    
    * Delete .pre-commit-config.yaml
    
    * Update CPM.cmake
    
    * cmake-format
    flagarde authored Mar 4, 2025
    Configuration menu
    Copy the full SHA
    0f23108 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2025

  1. Configuration menu
    Copy the full SHA
    97023e8 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2025

  1. feature: allow URI to use shorthand syntax with additional options (c…

    …pm-cmake#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]>
    SGSSGene and TheLartians authored May 3, 2025
    Configuration menu
    Copy the full SHA
    d761438 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2025

  1. Implement cpm-cmake#624: Use shorter hashes with CPM_SOURCE_CACHE (cp…

    …m-cmake#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 (cpm-cmake#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: cpm-cmake#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]>
    3 people authored May 18, 2025
    Configuration menu
    Copy the full SHA
    d9364ce View commit details
    Browse the repository at this point in the history
Loading