Require a minimum of CMake 3.5 compatibility for librdkafka build.
The most recent CMake (released March 28, 2025) drops 3.2 compatibility, which the version of librdkafka in rdkafka-sys (2.3.0) depends on. Recent versions of librdkafka increase the min cmake version to 3.5. Rather than upgrade rdkafka-sys to a new librdkafka or patch that source, this PR simply specifies a new min CMake version in the build.rs file.
To check that it's working, you can just run cargo build --features cmake-build, which fails on head in master.
P.S. Compatibility with versions of CMake older than 3.5 has been removed. in CMake 4.0
https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features
So we see this error
--- stderr
Building and linking librdkafka statically
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
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.
👋 can you cut a new release per this PR merge?
Release 0.38.0 has been published.