Skip to content

cmake/FindGSS: fix processing C header path options#17805

Closed
vszakats wants to merge 8 commits intocurl:masterfrom
vszakats:cm-gss-fixups
Closed

cmake/FindGSS: fix processing C header path options#17805
vszakats wants to merge 8 commits intocurl:masterfrom
vszakats:cm-gss-fixups

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 3, 2025

When processing --cflags received from krb5-config for gssapi:

  • fix to not break on multiple -I options. Before this patch only
    the first -I option was processed as a header directory, subsequent
    ones ended up in C flags as a raw directory, without the -I arg.
    Follow-up to 558814e

  • fix to not duplicate C flags.
    Regression from 1467597 cmake: fix pkg-config-based detection in FindGSS.cmake #14430

  • drop local variable _val by re-using _flag.

  • tidy up comments.

Ref: #17802 (comment)


@github-actions github-actions bot added the build label Jul 3, 2025
@vszakats vszakats changed the title cmake/FindGSS: fix processing C header directory options cmake/FindGSS: fix processing C header path options Jul 3, 2025
@vszakats vszakats marked this pull request as draft July 3, 2025 00:29
vszakats added 4 commits July 3, 2025 02:50
It'd be nice to do, but it trips `cmake-lint`.

```
FindGSS.cmake:55,04: [C0103] Invalid directory variable name "_GSS_CFLAGS" doesn't match `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`
FindGSS.cmake:56,04: [C0103] Invalid directory variable name "_GSS_LIBRARY_DIRS" doesn't match `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`
FindGSS.cmake:93,08: [C0103] Invalid directory variable name "_GSS_INCLUDE_DIRS" doesn't match `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`
FindGSS.cmake:94,08: [C0103] Invalid directory variable name "_GSS_LIBRARIES" doesn't match `[A-Z][0-9A-Z_]+|_[0-9a-z_]+`
```

The fix is a little more complex and better be done in a separate
commit for sensible diffs.
@vszakats vszakats marked this pull request as ready for review July 3, 2025 01:03
vszakats added a commit to vszakats/curl that referenced this pull request Jul 3, 2025
When processing `--cflags` received from `krb5-config` for `gssapi`:

- fix to not break on multiple `-I` options. Before this patch only
  the first `-I` option was processed as a header directory, subsequent
  ones ended up in C flags as a raw directory, without the `-I` part.
  Follow-up to 558814e

- fix to not duplicate C flags.
  Regression from 1467597 curl#14430

- drop local variable `_val` by re-using `_flag`.

- tidy up comments.

Ref: curl#17802 (comment)

Closes curl#17805
@vszakats vszakats closed this in 24c91d9 Jul 3, 2025
@vszakats vszakats deleted the cm-gss-fixups branch July 3, 2025 11:50
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