curl-curl/CMake
Viktor Szakats 578ee6b79b
gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings
Extend `#pragma diagnostic push`/`pop` guards to the whole codebase
(from tests and examples only) to disable it for GCC <4.6. Rename guard
to `CURL_HAVE_DIAG` and make it include llvm/clang to be interchangeable
with `__GNUC__ || __clang__` in this context.

The above means no longer disabling certain warnings locally, so pair
this with disabling all picky warnings for GCC <4.6.

Also:
- drop global workarounds for misbehaving GCC <4.6 compiler warnings.
  Not needed with picky warnings disabled.

Reported-by: fds242 on github
Reported-by: Sergey Fedorov
Thanks-to: Orgad Shaneh
Follow-up to f07a98ae11 #20366
Fixes #20892
Fixes #20924
Closes #20902
Closes #20907
2026-03-18 11:33:37 +01:00
..
cmake_uninstall.in.cmake cmake: match filename suffixes with file content 2025-12-20 11:34:27 +01:00
curl-config.in.cmake cmake: rework binutils ld hack to not read LOCATION property 2026-03-16 13:32:39 +01:00
CurlSymbolHiding.cmake build: merge TrackMemory (CURLDEBUG) into debug-enabled option 2026-01-19 18:43:17 +01:00
CurlTests.c badwords: avoid 'simply' 2026-03-10 19:34:06 +01:00
FindBrotli.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindCares.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindGnuTLS.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindGSS.cmake cmake/FindGSS: add backtick missing from comment 2026-01-27 15:08:33 +01:00
FindLDAP.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindLibbacktrace.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindLibgsasl.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindLibidn2.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindLibpsl.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindLibrtmp.cmake cmake: replace deprecated OPENSSL_FOUND with OpenSSL_FOUND 2025-12-17 17:56:33 +01:00
FindLibssh2.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindLibssh.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindLibuv.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindMbedTLS.cmake cmake/FindMbedTLS: add workaround for missing static MSVC mbedcrypto.lib 4.0.0 2026-02-19 12:38:49 +01:00
FindNettle.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindNGHTTP2.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindNGHTTP3.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindNGTCP2.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
FindQuiche.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindRustls.cmake cmake/FindRustls: merge two ifs 2025-12-18 15:16:33 +01:00
FindWolfSSL.cmake cmake: define dependencies as IMPORTED interface targets 2025-11-29 01:41:40 +01:00
FindZstd.cmake cmke: add *_USE_STATIC_LIBS options for 9 dependencies 2026-01-26 05:21:24 +01:00
Macros.cmake cmake: resolve imported targets recursively when generating libcurl.pc 2026-03-16 11:57:56 +01:00
OtherTests.cmake build: check MSG_NOSIGNAL directly, drop detection and interim macro 2026-02-11 14:51:08 +01:00
PickyWarnings.cmake gcc: guard #pragma diagnostic in core code for <4.6, disable picky warnings 2026-03-18 11:33:37 +01:00
unix-cache.cmake build: check MSG_NOSIGNAL directly, drop detection and interim macro 2026-02-11 14:51:08 +01:00
Utilities.cmake cmake: fix LOCATION property access condition (debug) 2026-03-06 15:35:27 +01:00
win32-cache.cmake build: drop unused snprintf() feature check on Windows 2026-03-02 22:40:29 +01:00