Skip to content

Failure with cmake 4.1 #4946

@hsdk123

Description

@hsdk123

Description

The latest cmake version is 4.1.2, and thus seems to fail
https://github.com/nlohmann/json/blob/develop/CMakeLists.txt#L1

Is there a reason why there's a cmake max check defined?

Reproduction steps

Use cmake 4.1

Expected vs. actual results

No error expected.
CMake's error in these situations is also confusing as it doesn't highlight the maximum version:

CMake Error at /Users/runner/work/Light.vn-core/Light.vn-core/_deps/json/230202b6f5267cbf0c8e5a2f17301964d95f83ff/CMakeLists.txt:1 (cmake_minimum_required):
-- Configuring incomplete, errors occurred!
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

Minimal code example

Error messages

Compiler and operating system

emscripten, Windows

Library version

develop

Validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions