cmake: configure c-ares header directory in project root (was: lib)#17707
Closed
vszakats wants to merge 1 commit into
Closed
cmake: configure c-ares header directory in project root (was: lib)#17707vszakats wants to merge 1 commit into
vszakats wants to merge 1 commit into
Conversation
Otherwise it only applies to lib targets via dir prop and this case
isn't picked up by the clang-tidy header dir picking logic. Also,
there was no real reason why this single header dir had to be specced
like this. Also referring to 16973 which also removed this exception.
To avoid this:
```
245/247] cd /Users/runner/work/curl/curl/tests/tunit && /opt/homebrew/opt/llvm/bin/clang-tidy -checks=-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling -quiet --warnings-as-errors=* ../libtest/first.c ../libtest/first.h tool1394.c tool1604.c tool1621.c -- -I/Users/runner/work/curl/curl/include -I/opt/homebrew/Cellar/mbedtls/3.6.3.1/include -I/opt/homebrew/Cellar/gnutls/3.8.9/include -I/opt/homebrew/Cellar/nettle/3.10.1/include -I/opt/homebrew/Cellar/libtasn1/4.20.0/include -I/opt/homebrew/Cellar/libidn2/2.3.8/include -I/opt/homebrew/Cellar/p11-kit/0.25.5/include/p11-kit-1 -I/opt/homebrew/Cellar/nettle/3.10.1/include -I/opt/homebrew/Cellar/brotli/1.1.0/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/libnghttp2/1.65.0/include -I/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include -I/opt/homebrew/Cellar/libpsl/0.21.5_2/include -I/opt/homebrew/Cellar/libidn2/2.3.8/include -I/opt/homebrew/Cellar/libssh2/1.11.1/include -I/opt/homebrew/Cellar/openssl@3/3.5.0/include -I/opt/homebrew/Cellar/gsasl/2.2.2/include -I/opt/homebrew/Cellar/rtmpdump/2.4-20151223_3/include -I/opt/homebrew/Cellar/openssl@3/3.5.0/include -I/Users/runner/work/curl/curl/include -I/opt/homebrew/Cellar/mbedtls/3.6.3.1/include -I/opt/homebrew/Cellar/gnutls/3.8.9/include -I/opt/homebrew/Cellar/nettle/3.10.1/include -I/opt/homebrew/Cellar/libtasn1/4.20.0/include -I/opt/homebrew/Cellar/libidn2/2.3.8/include -I/opt/homebrew/Cellar/p11-kit/0.25.5/include/p11-kit-1 -I/opt/homebrew/Cellar/nettle/3.10.1/include -I/opt/homebrew/Cellar/brotli/1.1.0/include -I/opt/homebrew/opt/zstd/include -I/opt/homebrew/Cellar/libnghttp2/1.65.0/include -I/Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include -I/opt/homebrew/Cellar/libpsl/0.21.5_2/include -I/opt/homebrew/Cellar/libidn2/2.3.8/include -I/opt/homebrew/Cellar/libssh2/1.11.1/include -I/opt/homebrew/Cellar/openssl@3/3.5.0/include -I/opt/homebrew/Cellar/gsasl/2.2.2/include -I/opt/homebrew/Cellar/rtmpdump/2.4-20151223_3/include -I/opt/homebrew/Cellar/openssl@3/3.5.0/include -I/Users/runner/work/curl/curl/bld/lib -I/Users/runner/work/curl/curl/lib -I/Users/runner/work/curl/curl/lib/curlx -I/Users/runner/work/curl/curl/src -I/Users/runner/work/curl/curl/tests/libtest -I/Users/runner/work/curl/curl/tests/unit -I/Users/runner/work/curl/curl/tests/tunit -DHAVE_CONFIG_H -DUNITTESTS -DCURL_NO_OLDIES -DCURL_DISABLE_DEPRECATION
[1/5] Processing file /Users/runner/work/curl/curl/tests/tunit/../libtest/first.c.
192 warnings generated.
[2/5] Processing file /Users/runner/work/curl/curl/tests/tunit/../libtest/first.h.
384 warnings generated.
[3/5] Processing file /Users/runner/work/curl/curl/tests/tunit/tool1394.c.
576 warnings generated.
[4/5] Processing file /Users/runner/work/curl/curl/tests/tunit/tool1604.c.
768 warnings generated.
[5/5] Processing file /Users/runner/work/curl/curl/tests/tunit/tool1621.c.
960 warnings and 1 error generated.
Error while processing /Users/runner/work/curl/curl/tests/tunit/tool1621.c.
/Users/runner/work/curl/curl/lib/httpsrr.h:30:10: error: 'ares.h' file not found [clang-diagnostic-error]
30 | #include <ares.h>
| ^~~~~~~~
FAILED: [code=1] tests/tunit/CMakeFiles/tunits-clang-tidy
```
https://github.com/curl/curl/actions/runs/15809101772/job/44557991572?pr=17705
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The c-ares header directory was added to the header path within
lib,as opposed to every other dependency which added them in the root
CMakeLists.txt. Such exception is no longer necessary. This patchaligns c-ares header setup with the rest of dependencies. And also with
autotools, which also makes no exception here.
Cherry-picked from #17705
Cherry-picked from #16973