Skip to content

cmake: fix curl_add_clang_tidy_test_target when no -D option #17813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jul 4, 2025

Fix curl_add_clang_tidy_test_target generating an invalid option for
clang-tidy if the tested target has no custom macro definition.

Current build doesn't hit this case, but a pending PR does.

Fixing:

[...] -Ilib -Itests/client -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -D_definitions_t-NOTFOUND

error: ISO C99 requires whitespace after the macro name [clang-diagnostic-c99-extensions,-warnings-as-errors]

Cherry-picked from #17768

… option

Current build doesn't hit this case, but a pending PR does.

Fixing:
```
[...] -Ilib -Itests/client -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -D_definitions_t-NOTFOUND
```
error: ISO C99 requires whitespace after the macro name [clang-diagnostic-c99-extensions,-warnings-as-errors]

Ref: curl#17768
@github-actions github-actions bot added the build label Jul 4, 2025
@vszakats vszakats changed the title cmake: fix curl_add_clang_tidy_test_target for targets with no -D option cmake: fix curl_add_clang_tidy_test_target when no -D option Jul 4, 2025
@vszakats vszakats closed this in 42fdc65 Jul 4, 2025
@vszakats vszakats deleted the cm-tidy-macro-no-defs-fix branch July 4, 2025 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant