DEPRECATE: add CMake <3.18 deprecation for April 2026 - #19902
Closed
vszakats wants to merge 2 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a deprecation notice for CMake versions earlier than 3.18, scheduled for removal in April 2026. The change aligns with curl's ongoing effort to modernize build requirements and drop support for older tooling versions. Currently, the codebase supports CMake 3.7-3.16.
Key Changes:
- Added CMake 3.17 and earlier to the list of deprecated features in docs/DEPRECATE.md with an April 2026 removal date
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bagder
approved these changes
Dec 9, 2025
bagder
left a comment
Member
There was a problem hiding this comment.
👍 We could possibly add already there that 3.18.0 was released on July 15, 2020.
This was referenced Jan 23, 2026
vszakats
added a commit
that referenced
this pull request
Jan 23, 2026
Bump CMake version in CMake integration tests for better performance (8x on macOS, 2-3x on Windows) and native arm64 binaries. - bump old CMake in integration tests to v3.19.8 (was: v3.11.4) - switch to native arm64 CMake binaries on macOS. - switch Linux CMake integration job to arm64. Speed gains: - Linux: 2m -> 1m30s - macOS: 9-10m -> 1m15s - Windows: 6-7m -> 2m43s Before: https://github.com/curl/curl/actions/runs/21255697172 https://github.com/curl/curl/actions/runs/21255020621 After: https://github.com/curl/curl/actions/runs/21272021446 With this, CI is: - no longer testing deprecated CMake versions. Follow-up to a7c974e #19902 - not testing the next (from 2026 April) minimum 3.18, but going for 3.19 instead. For arm64 binaries on both macOS and Linux. There is no 3.18-specific CMake code in curl. Cherry-picked from #20407 Closes #20408
vszakats
added a commit
that referenced
this pull request
Mar 21, 2026
Require CMake 3.18 (2020-07-15) or newer, up from 3.7 (2016-11-11) prior to this patch. This requirement also applies to the distributed `curl-config.cmake`. To allow dropping compatibility code maintained for old versions, and to use features which were unpractical in separate code paths. Also to make testing, documentation and development easier, CI builds faster due to CMake performance improvements over time. (e.g. integration tests on macOS run 8x faster (10 minutes is now under 1.5m) in CI, 2.5x faster on Windows.) CMake offers pre-built binaries for major platforms. They work without an install step, just by unpacking and pointing the cmake command to them. Making upgrades easy in many cases: https://cmake.org/download/ https://cmake.org/files/ https://github.com/Kitware/CMake/releases CMake 3.18 brings these feature as generally available when building or consuming curl/libcurl: LTO support, improved performance, `pkg-config` and interface target support, `OBJECT` target (for faster libcurl builds), modern invocation with `-S`/`-B` options, better support for custom linker options, FetchContent, `GnuTLS::GnuTLS` target, `--verbose` and `--install` options, `CMAKE_GENERATOR` env, last but not least unity mode and Ninja generator. For maximum build speed, use: `-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON` As for deprecations, C++11 is required to build CMake itself, which may be a limit on some platforms. autotools continues to cover them. Follow-up to 9bcdfb3 #20408 Follow-up to a7c974e #19902 Follow-up to dfbe035 #10161 Discussion: #18704 Closes #20407
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
Require CMake 3.18 (2020-07-15) or newer, up from 3.7 (2016-11-11) prior to this patch. This requirement also applies to the distributed `curl-config.cmake`. To allow dropping compatibility code maintained for old versions, and to use features which were unpractical in separate code paths. Also to make testing, documentation and development easier, CI builds faster due to CMake performance improvements over time. (e.g. integration tests on macOS run 8x faster (10 minutes is now under 1.5m) in CI, 2.5x faster on Windows.) CMake offers pre-built binaries for major platforms. They work without an install step, just by unpacking and pointing the cmake command to them. Making upgrades easy in many cases: https://cmake.org/download/ https://cmake.org/files/ https://github.com/Kitware/CMake/releases CMake 3.18 brings these feature as generally available when building or consuming curl/libcurl: LTO support, improved performance, `pkg-config` and interface target support, `OBJECT` target (for faster libcurl builds), modern invocation with `-S`/`-B` options, better support for custom linker options, FetchContent, `GnuTLS::GnuTLS` target, `--verbose` and `--install` options, `CMAKE_GENERATOR` env, last but not least unity mode and Ninja generator. For maximum build speed, use: `-DCMAKE_UNITY_BUILD=ON -DCURL_DROP_UNUSED=ON` As for deprecations, C++11 is required to build CMake itself, which may be a limit on some platforms. autotools continues to cover them. Follow-up to 9bcdfb3 curl#20408 Follow-up to a7c974e curl#19902 Follow-up to dfbe035 curl#10161 Discussion: curl#18704 Closes curl#20407
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CMake 3.18 was released on 2020-07-15.
It enables using (and/or dropping workarounds) for these features:
LTO support, better performance and pkg-config support,
OBJECTtarget,-S,-B,--verbose,--installon the command-line, lib directorysupport in interface targets, target_link_options(), LINK_OPTIONS,
FetchContent,
list(PREPEND ...), unity, Ninja, fixed imported globalissues.
Ref: #18704