BeiBaiNian opened a new pull request, #272:
URL: https://github.com/apache/casbin-cpp/pull/272
# Why
The Windows CI job (`build (windows-latest, 3.12)` in `python_binding.yml`)
fails at the "Build and install" step with:
```
CMake Error at
build/temp.win-amd64-cpython-312/Release/_deps/json-src/CMakeLists.txt:1
(cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
```
The Windows runner ships a recent CMake (4.x), which removed compatibility
with `cmake_minimum_required(VERSION < 3.5)`. The pinned nlohmann/json v3.11.2
declares `cmake_minimum_required(VERSION 3.1)`, so CMake 4.x rejects it while
configuring the FetchContent dependency. The Ubuntu job is unaffected because
its CMake is still 3.x.
# What changed
- `cmake/modules/Findjson.cmake`: bump the FetchContent `GIT_TAG` of
nlohmann/json from `v3.11.2` to `v3.12.0`. v3.12.0 declares
`cmake_minimum_required(VERSION 3.5...4.0)`, which is accepted by CMake 4.x.
# Verification
- Reproduced the CI failure locally with CMake 4.4.2 + json v3.11.2: same
error as the Windows CI log.
- With json v3.12.0 + CMake 4.4.2: `cmake` configure succeeds, and
`mingw32-make casbin` builds `libcasbin.a` successfully.
- Only 1 file changed; the fix is limited to the dependency version bump.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]