You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake: declare version and policy requirements once at the top level (#808)
Each backend subdirectory (libusb, linux, mac, netbsd) called
cmake_minimum_required() with its own version range. That call resets
the CMake policy stack to the range's upper bound, discarding policies
introduced later. When hidapi is built as a CMake subproject (e.g. the
Meson cmake.subproject path), a modern CMake then emits dev warnings
for CMP0156/CMP0181/CMP0200 right after each backend's call.
The backends have no project() of their own and are never configured
standalone, so their cmake_minimum_required() calls served no purpose
beyond resetting policies. Remove them; the backends now inherit the
single policy baseline from the top-level CMakeLists.txt, matching what
windows/CMakeLists.txt already did.
Raise the top-level range to 3.6.3...4.3: 3.6.3 is the real floor (it
was already required by the linux/libusb/netbsd backends), and the 4.3
upper bound sets every current policy to NEW.
hidtest keeps its own cmake_minimum_required() because it is also built
as a standalone project; its upper bound is raised to 4.3 so it behaves
identically whether built standalone or as a subdirectory.
Assisted-by: Claude:claude-opus-4.7
0 commit comments