From d3b93ef1e34cb1040311e33caef9502758e2cd73 Mon Sep 17 00:00:00 2001 From: Damiano Mazzella Date: Tue, 13 May 2025 16:44:51 +0200 Subject: [PATCH] update trait dependencies to support CMake v4 (#379) * update nlohmann-json to 3.12.0 (fix cmake min version) * Bump fetch ver Needs new md5 * 3.12 md5 * Limit hunter cmake version * bump jsoncpp version to v1.9.6 as well * bump workflow as well as default --------- Co-authored-by: Chris Mc --- .github/actions/install/nlohmann-json/action.yml | 2 +- .../actions/install/open-source-parsers-jsoncpp/action.yml | 2 +- .github/workflows/cmake.yml | 2 ++ .github/workflows/traits.yml | 4 ++-- CMakeLists.txt | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/actions/install/nlohmann-json/action.yml b/.github/actions/install/nlohmann-json/action.yml index 7300aea..8012492 100644 --- a/.github/actions/install/nlohmann-json/action.yml +++ b/.github/actions/install/nlohmann-json/action.yml @@ -4,7 +4,7 @@ inputs: version: description: The desired nlohmann-json version to install required: false - default: "3.11.2" + default: "3.12.0" runs: using: composite steps: diff --git a/.github/actions/install/open-source-parsers-jsoncpp/action.yml b/.github/actions/install/open-source-parsers-jsoncpp/action.yml index 3a341f2..5eed407 100644 --- a/.github/actions/install/open-source-parsers-jsoncpp/action.yml +++ b/.github/actions/install/open-source-parsers-jsoncpp/action.yml @@ -4,7 +4,7 @@ inputs: version: description: The desired open-source-parsers/jsoncpp version to install required: false - default: "1.9.5" + default: "1.9.6" runs: using: composite steps: diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 12e8a88..2d92fc9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -259,6 +259,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: lukka/get-cmake@latest + with: + cmakeVersion: "~3.25.0" # <--= optional, use most recent 3.25.x version - name: setup run: | diff --git a/.github/workflows/traits.yml b/.github/workflows/traits.yml index ae0a8eb..aedcb14 100644 --- a/.github/workflows/traits.yml +++ b/.github/workflows/traits.yml @@ -15,9 +15,9 @@ jobs: target: - { name: "danielaparker-jsoncons", tag: "1.3.2", version: "v1.3.2" } - { name: "boost-json", tag: "1.78.0", version: "v1.80.0" } - - { name: "nlohmann-json", tag: "3.11.2", version: "v3.11.2" } + - { name: "nlohmann-json", tag: "3.12.0", version: "v3.12.0" } - { name: "kazuho-picojson", tag: "111c9be5188f7350c2eac9ddaedd8cca3d7bf394", version: "111c9be" } - - { name: "open-source-parsers-jsoncpp", tag: "1.9.5", version: "v1.9.5" } + - { name: "open-source-parsers-jsoncpp", tag: "1.9.6", version: "v1.9.6" } steps: - uses: actions/checkout@v4 - uses: lukka/get-cmake@latest diff --git a/CMakeLists.txt b/CMakeLists.txt index 2520e4e..e20c74d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,8 +81,8 @@ if(JWT_BUILD_EXAMPLES OR JWT_BUILD_TESTS) message(STATUS "jwt-cpp: using FetchContent for nlohmann-json required for tests") include(FetchContent) fetchcontent_declare(nlohmann_json - URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz - URL_MD5 127794b2c82c0c5693805feaa2a703e2) + URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz + URL_MD5 e155202b2a589137f6804724bd182f12) fetchcontent_makeavailable(nlohmann_json) endif() endif()