-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the bug, including details regarding any error messages, version, and platform.
When building the C++ library with CMake 4.0 or newer, the configuration stage fails with a fatal error. This occurs because CMake 4.0 has officially removed support for policies older than 3.5.
Several bundled third-party dependencies (notably RapidJSON) specify a cmake_minimum_required version as low as 2.8 in their internal build files. When CMake 4.x encounters these, it halts the build process.
Currently, the following implementation exists in cpp/cmake_modules/ThirdpartyToolchain.cmake :
However, it appears to be defined too late for certain build configurations. When using CMake 4.0+, the configuration triggers a fatal error the moment a bundled dependency (like RapidJSON) is evaluated.
Proposed Adjustment
Moving set(CMAKE_POLICY_VERSION_MINIMUM 3.5) to cpp/CMakeLists.txt (before any sub-modules or dependencies are included).
Component(s)
C++