curl-curl/.github
Viktor Szakats 89043ba906
cmake: drop support for CMake 3.17 and older
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 9bcdfb3809 #20408
Follow-up to a7c974e038 #19902
Follow-up to dfbe035c8b #10161
Discussion: https://github.com/curl/curl/discussions/18704

Closes #20407
2026-03-21 13:24:47 +01:00
..
ISSUE_TEMPLATE VULN-DISCLOSURE-POLICY.md: use hackerone 2026-02-26 07:57:19 +01:00
scripts scripts: harden / tidy up more Perl system() calls 2026-03-19 14:26:56 +01:00
workflows cmake: drop support for CMake 3.17 and older 2026-03-21 13:24:47 +01:00
CODEOWNERS CI: add whitespace checker 2024-06-27 13:33:30 +02:00
CONTRIBUTING.md tidy-up: Markdown, clang-format nits 2026-01-22 23:44:47 +01:00
dependabot.yml GHA/dependabot: tidy-ups 2025-11-02 17:45:50 +01:00
FUNDING.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
labeler.yml tidy-up: merge root packages directory into projects 2026-01-12 23:49:35 +01:00
lock.yml copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
stale.yml badwords: fix issues found in scripts and other files 2025-11-17 17:18:07 +01:00