curl-curl/CMake
Viktor Szakats e54c80b397
cmake: curl_add_clang_tidy_test_target tidy-ups
- simplify gathering header directories and compiler definitions
  recursively.

- handle the case when the cmake directory object doesn't define header
  directories or compiler definitions.

- honor more corners cases:
  - `INTERFACE_INCLUDE_DIRECTORIES` of the initial target.
  - handle no header directory for initial target.

- de-duplicate header directories and compiler redefinitions to mimic
  CMake.

- drop unnecessary `unset()`s.

Note that the order of header directories remains different compared to
how CMake passes them to the compiler when building tests. The order is
already different in the test target `INCLUDE_DIRECTORIES` property,
preventing to reproduce the exact CMake order. The distinction between
`-I` and `-isystem` is also missing from target properties.

Cherry-picked from #17768

Closes #17814
2025-07-05 00:40:32 +02:00
..
cmake_uninstall.cmake.in cmake: replace exec_program() with execute_process() 2025-03-23 00:06:25 +01: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: test integration with old cmake (v3.11.4 2018-03-28) 2025-05-08 15:11:24 +02:00
CurlSymbolHiding.cmake cmake: quotes, whitespace, use VERSION_GREATER_EQUAL 2025-04-10 01:42:59 +02:00
CurlTests.c build: drop HAVE_SYS_SOCKET_H and HAVE_SYS_TIME_H macros 2025-06-15 18:44:39 +02:00
FindBrotli.cmake cmake: fix missed version number for multi-pkg-config detections 2025-05-29 06:59:02 +02:00
FindCares.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindGSS.cmake cmake/FindGSS: initialize result variables 2025-07-03 17:51:51 +02:00
FindLDAP.cmake cmake: fix missed version number for multi-pkg-config detections 2025-05-29 06:59:02 +02:00
FindLibgsasl.cmake cmake: replace cmakelint with cmake-lint from cmakelang, fix issues 2025-06-11 07:07:49 +02:00
FindLibidn2.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindLibpsl.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindLibrtmp.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindLibssh2.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindLibssh.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindLibuv.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindMbedTLS.cmake cmake: fix missed version number for multi-pkg-config detections 2025-05-29 06:59:02 +02:00
FindMSH3.cmake cmake: move pkg-config names to Find modules 2024-12-26 12:59:59 +01:00
FindNettle.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindNGHTTP2.cmake cmake: move pkg-config names to Find modules 2024-12-26 12:59:59 +01:00
FindNGHTTP3.cmake cmake: move pkg-config names to Find modules 2024-12-26 12:59:59 +01:00
FindNGTCP2.cmake cmake: document OpenSSL and ngtcp2 crypto lib custom variables 2025-06-10 16:31:07 +02:00
FindQuiche.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindRustls.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindWolfSSH.cmake cmake: clear package version after pkg-config detection 2024-10-25 15:04:35 +02:00
FindWolfSSL.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
FindZstd.cmake cmake/Find: set <Modulename>_FOUND for compatibility when found via pkg-config 2025-02-07 00:07:38 +01:00
Macros.cmake cmake: curl_add_clang_tidy_test_target tidy-ups 2025-07-05 00:40:32 +02:00
OtherTests.cmake build: drop HAVE_SYS_SOCKET_H and HAVE_SYS_TIME_H macros 2025-06-15 18:44:39 +02:00
PickyWarnings.cmake cmake: replace cmakelint with cmake-lint from cmakelang, fix issues 2025-06-11 07:07:49 +02:00
unix-cache.cmake build: stop checking for sys/stat.h 2025-06-24 09:44:28 +02:00
Utilities.cmake cmake: drop reference to future variable [ci skip] 2025-06-22 13:19:15 +02:00
win32-cache.cmake build: stop checking for sys/stat.h 2025-06-24 09:44:28 +02:00