curl/CMake
Viktor Szakats fb711b5098
build: fix clang-cl builds, add CI job
- appveyor: add build-only job for clang-cl.

- cmake: `-pedantic-errors` enables `-Werror,-Wlanguage-extension-token`
  automatically, which makes `__int64` detection fail.
  Explictly disable this compiler warning for clang-cl to make the
  feature detection work and to accept `__int64` in the source code.

- cmake: disable `-Wlanguage-extension-token` warning for clang-cl
  to fix these when encountering `__int64`:
  ```
  lib/formdata.c(797,29): error : extension used [-Werror,-Wlanguage-extension-token]
  lib/warnless.c(117,33): error : extension used [-Werror,-Wlanguage-extension-token]
  lib/warnless.c(60,28): message : expanded from macro 'CURL_MASK_SCOFFT'
  lib/warnless.c(59,38): message : expanded from macro 'CURL_MASK_UCOFFT'
  include\curl/system.h(352,40): message : expanded from macro 'CURL_TYPEOF_CURL_OFF_T'
  ```

- make `__GNUC__` warning suppressions apply to `__clang__` too.
  Necessary for clang-cl, which defines the latter, but not the former.
  (Regular clang defines both.)

- examples: fix clang-cl compiler warning in `http2-upload.c`.
  ```
  docs\examples\http2-upload.c(56,5): error : no previous prototype for function 'my_gettimeofday' [-Werror,-Wmissing-prototypes]
  docs\examples\http2-upload.c(56,1): message : declare 'static' if the function is not intended to be used outside of this translation unit
  ```

- unit2604: add missing `#pragma GCC diagnostic pop`.
  Follow-up to e53523fef0 #14859

- unit1652: limit compiler warning suppression to GCC.
  They do not affect clang builds.
  Follow-up to 71cf0d1fca #14772

Closes #15449
2024-10-30 23:15:32 +01:00
..
Platforms cmake: tidy-ups and rebase fixups 2024-10-12 22:33:29 +02:00
cmake_uninstall.cmake.in cmake: more small tidy-ups and fixes 2024-08-08 13:48:28 +02:00
CMakeConfigurableFile.in copyright: update all copyright lines and remove year ranges 2023-01-03 09:19:21 +01:00
curl-config.cmake.in cmake: tidy up 2024-09-22 09:51:15 +02:00
CurlSymbolHiding.cmake tidy-up: whitespace, fix CI spacecheck for docs 2024-10-30 23:15:28 +01:00
CurlTests.c cmake: apply WIN32_LEAN_AND_MEAN to all feature checks 2024-10-11 17:57:03 +02:00
FindBearSSL.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindBrotli.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindCares.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindGSS.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibgsasl.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibidn2.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibpsl.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibssh2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindLibssh.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindLibuv.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindMbedTLS.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindMSH3.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNettle.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindNGHTTP2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNGHTTP3.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindNGTCP2.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindQuiche.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindRustls.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
FindWolfSSH.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindWolfSSL.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindZstd.cmake cmake: document -D and env build options 2024-10-24 23:06:40 +02:00
Macros.cmake cmake: use list(APPEND) on CURL_INCLUDES 2024-10-24 19:16:10 +02:00
OtherTests.cmake cmake: use the BSD variable 2024-10-22 20:20:41 +02:00
PickyWarnings.cmake build: fix clang-cl builds, add CI job 2024-10-30 23:15:32 +01:00
Utilities.cmake cmake: more syntax tidy-up 2024-08-07 23:41:27 +02:00