curl-curl/appveyor.yml
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

151 lines
5.8 KiB
YAML

#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
# https://ci.appveyor.com/project/curlorg/curl/history
# AppVeyor configuration:
# https://www.appveyor.com/docs/appveyor-yml/
# AppVeyor worker images:
# https://www.appveyor.com/docs/windows-images-software/
version: 7.50.0.{build}
environment:
matrix:
# CMake Visual Studio builds
- job_name: 'CM VS2022, Release, x64, OpenSSL 3.5, Shared, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
CMAKE_GENERATE: '-A x64 -DCURL_USE_SCHANNEL=OFF -DCURL_USE_OPENSSL=ON'
- job_name: 'CM VS2022, Release, arm64, Schannel, Static, !DEBUGBUILD, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
CMAKE_GENERATE: '-A ARM64 -DENABLE_DEBUG=OFF -DBUILD_SHARED_LIBS=OFF'
- job_name: 'CM VS2010, Debug, x64, Schannel, Shared, Build-tests & examples'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: 3.18.4
CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d
CMAKE_GENERATOR: 'Visual Studio 10 2010'
CMAKE_GENERATE: '-A x64'
- job_name: 'CM VS2012, Release, x86, Schannel, Shared, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: 3.21.7
CMAKE_SHA256: 4c4840e2dc2bf82e8a16081ff506bba54f3a228b91ce36317129fed4035ef2e3
CMAKE_GENERATOR: 'Visual Studio 11 2012'
CMAKE_GENERATE: '-A Win32'
- job_name: 'CM VS2013, Debug, x64, Schannel, Shared'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: 3.18.4
CMAKE_SHA256: a932bc0c8ee79f1003204466c525b38a840424d4ae29f9e5fb88959116f2407d
CMAKE_GENERATOR: 'Visual Studio 12 2013'
CMAKE_GENERATE: '-A x64'
- job_name: 'CM VS2015, Debug, x64, Schannel, Static'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
CMAKE_VERSION: 3.19.8
CMAKE_SHA256: 2a30877a3d6b50da305b289f4d1c03befdfaeb2edba02a563c681e883d810380
CMAKE_GENERATOR: 'Visual Studio 14 2015'
CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF'
- job_name: 'CM VS2017, Debug, x64, Schannel, Shared'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2017'
CMAKE_VERSION: 3.20.6
CMAKE_SHA256: f240a38c964712aac474644b3ba21bdc2b4e8d5e31179f67bd2e6f45fa349419
CMAKE_GENERATOR: 'Visual Studio 15 2017'
CMAKE_GENERATE: '-A x64'
- job_name: 'CM VS2019, Debug, x64, OpenSSL 3.0 + Schannel, Shared, !verbose, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2019'
CMAKE_GENERATOR: 'Visual Studio 16 2019'
CMAKE_GENERATE: '-A x64 -DCURL_USE_OPENSSL=ON -DCURL_DISABLE_VERBOSE_STRINGS=ON'
- job_name: 'CM VS2022, Debug, x64, OpenSSL 3.5 + Schannel, Static, Unicode, Build-tests & examples, clang-cl'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
CMAKE_GENERATE: '-A x64 -T ClangCl -DBUILD_SHARED_LIBS=OFF -DCURL_USE_OPENSSL=ON -DENABLE_UNICODE=ON'
- job_name: 'CM VS2022, Release, x64, Schannel, Shared, Unicode, !DEBUGBUILD, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
ENABLE_UNICODE: 'ON'
CMAKE_GENERATE: '-A x64 -DENABLE_UNICODE=ON -DENABLE_DEBUG=OFF'
- job_name: 'CM VS2022, Debug, x64, !ssl, Static, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF'
- job_name: 'CM VS2022, Debug, x64, !ssl, Static, HTTP-only, Build-tests'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2022'
CMAKE_GENERATOR: 'Visual Studio 17 2022'
CMAKE_GENERATE: '-A x64 -DBUILD_SHARED_LIBS=OFF -DCURL_USE_SCHANNEL=OFF -DHTTP_ONLY=ON'
# VisualStudioSolution builds
- job_name: 'VisualStudioSolution VS2010, Release, x86, Schannel'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2013'
PRJ_CFG: 'DLL Release - DLL Windows SSPI - DLL WinIDN'
PLAT: 'Win32'
VC_VERSION: VC10
- job_name: 'VisualStudioSolution VS2013, Debug, x64, Schannel'
APPVEYOR_BUILD_WORKER_IMAGE: 'Visual Studio 2015'
PRJ_CFG: 'DLL Debug - DLL Windows SSPI - DLL WinIDN'
PLAT: 'x64'
VC_VERSION: VC12
install:
- ps: $env:PATH = "C:/msys64/usr/bin;$env:PATH"
build_script:
- cmd: sh -c ./appveyor.sh
clone_depth: 10
# select branches to avoid testing feature branches twice (as branch and as pull request)
branches:
only:
- master
- /\/ci$/
skip_commits:
files:
- '.circleci/*'
- '.github/**/*'
- 'Dockerfile'
- 'projects/OS400/*'
- 'projects/vms/*'
#artifacts:
# - path: '**/curl.exe'
# name: curl
# - path: '**/*.dll'
# name: libcurl dll
# - path: '**/*.lib'
# name: libcurl lib