cmake: replace check_include_file_concat() for LDAP and GSS detection - #15157
Closed
vszakats wants to merge 3 commits into
Closed
cmake: replace check_include_file_concat() for LDAP and GSS detection#15157vszakats wants to merge 3 commits into
check_include_file_concat() for LDAP and GSS detection#15157vszakats wants to merge 3 commits into
Conversation
Member
Author
|
That's a deep rabbit-hole of issues...
Related commit/PR(s): #436 https://cmake.org/cmake/help/latest/module/CMakePushCheckState.html edit: Most of these were addressed via separate PRs. |
vszakats
marked this pull request as draft
October 5, 2024 10:43
cmake_{push,pop}_check_state() in LDAP detectioncmake_{push,pop}_check_state() more, and other tidy-ups
Contributor
|
Analysis of PR #15157 at bc0992c7: Test 593 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Generated by Testclutch |
vszakats
force-pushed
the
cm-use-pushpop
branch
from
October 5, 2024 14:23
bc0992c to
d1ac210
Compare
vszakats
marked this pull request as ready for review
October 5, 2024 15:04
4 tasks
vszakats
force-pushed
the
cm-use-pushpop
branch
from
October 6, 2024 09:34
b49f3c3 to
f7f4e78
Compare
cmake_{push,pop}_check_state() more, and other tidy-upscmake_push_check_state() more, other tidy-ups
vszakats
marked this pull request as draft
October 7, 2024 11:06
vszakats
force-pushed
the
cm-use-pushpop
branch
from
October 10, 2024 15:11
f7f4e78 to
d63202d
Compare
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 10, 2024
…DES` Cherry-picked from curl#15157
This was referenced Oct 10, 2024
vszakats
added a commit
that referenced
this pull request
Oct 10, 2024
Enclose `CMAKE_EXTRA_INCLUDE_FILES`, `CMAKE_REQUIRED_DEFINITIONS`, `CMAKE_REQUIRED_FLAGS`, `CMAKE_REQUIRED_INCLUDES`, `CMAKE_REQUIRED_LIBRARIES`, `CMAKE_REQUIRED_LINK_OPTIONS`, settings within `cmake_push_check_state()`/`cmake_pop_check_state()` calls. It prevents spilling them into other feature checks. It also replaces manual resets found in some places (which can have the undesired side-effect of destroying values meant for global use.) Cherry-picked from #15157 Closes #15251
vszakats
added a commit
that referenced
this pull request
Oct 10, 2024
…DES` It was done for `zlib`, `brotli`, `libpsl`, `libssh2`, `wolfssh` (a copy-paste case for `wolfssh`). Feature detections should not rely by default on dependency headers. There is no evidence they do now. If it becomes necessary, headers should added for the duration of the feature check. Ref: 118977f Cherry-picked from #15157 Closes #15252
vszakats
added a commit
that referenced
this pull request
Oct 10, 2024
Add comments saying when we want values set in feature check option variables to apply to all feature checks, globally. These are currently: `ws2_32` and `socket` libraries, and `-D_WIN32_WINNT=` macro. Also use `list(APPEND ...)` for the libraries to avoid overwriting potentially existing values. Cherry-picked from #15157 Closes #15253
2 tasks
ldap.h includes lber.h. If you know of a system where this is not the case, let us know.
include gssapi/gssapi.h when checking for gssapi_generic.h/gssapi_krb5.h To continue doing what ./configure does.
vszakats
force-pushed
the
cm-use-pushpop
branch
from
October 10, 2024 18:24
d63202d to
fc16a2d
Compare
cmake_push_check_state() more, other tidy-upscheck_include_file_concat() for LDAP and GSS detection
vszakats
marked this pull request as ready for review
October 10, 2024 18:29
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 12, 2024
Regression from rebase mistake in 91d451b curl#15157
vszakats
added a commit
that referenced
this pull request
Oct 12, 2024
- limit `SIZEOF_SA_FAMILY_T` detection to non-Windows. - make sure `sys/socket.h` exists before detecting `SIZEOF_SA_FAMILY_T`. - limit `mach_absolute_time()` detection to `APPLE`. Drop from Windows pre-cache. - skip `HAVE_LIBSOCKET` detection for Windows, drop pre-cached value. - drop redundant pre-cached `HAVE_LIBZ` for Windows. - `curl_required_libpaths()`: stop accepting multiple arguments. To prepare for `CMAKE_REQUIRED_LINK_DIRECTORIES` support. Follow-up to 7bab201 #15193 - GSS: fix recent rebase mistakes: - fix variable name. - do not add a header twice. Follow-up to 91d451b #15157 - GSS: quote a variable. Closes #15271
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Enclose `CMAKE_EXTRA_INCLUDE_FILES`, `CMAKE_REQUIRED_DEFINITIONS`, `CMAKE_REQUIRED_FLAGS`, `CMAKE_REQUIRED_INCLUDES`, `CMAKE_REQUIRED_LIBRARIES`, `CMAKE_REQUIRED_LINK_OPTIONS`, settings within `cmake_push_check_state()`/`cmake_pop_check_state()` calls. It prevents spilling them into other feature checks. It also replaces manual resets found in some places (which can have the undesired side-effect of destroying values meant for global use.) Cherry-picked from curl#15157 Closes curl#15251
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
…DES` It was done for `zlib`, `brotli`, `libpsl`, `libssh2`, `wolfssh` (a copy-paste case for `wolfssh`). Feature detections should not rely by default on dependency headers. There is no evidence they do now. If it becomes necessary, headers should added for the duration of the feature check. Ref: 118977f Cherry-picked from curl#15157 Closes curl#15252
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Add comments saying when we want values set in feature check option variables to apply to all feature checks, globally. These are currently: `ws2_32` and `socket` libraries, and `-D_WIN32_WINNT=` macro. Also use `list(APPEND ...)` for the libraries to avoid overwriting potentially existing values. Cherry-picked from curl#15157 Closes curl#15253
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Via these configuration values: - `LDAP_LIBRARY` - `LDAP_LBER_LIBRARY` - `LDAP_INCLUDE_DIR` Following the naming scheme used in `Find` modules. Cherry-picked from curl#15157 Closes curl#15255
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Replace `check_include_file_concat()` with `check_include_file()` in GSS/LDAP detection to avoid these headers spilling into subsequent feature checks. - For LDAP, reverse detection order to match with `./configure`. Though, in current LDAP packages `ldap.h` does include `lber.h`. - For GSS, align header detection logic with `./configure`, where `gssapi/gssapi_generic.h` might require `gssapi/gssapi.h`, and `gssapi/gssapi_krb5.h` might require both. Ref: curl#436 Closes curl#15157
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- limit `SIZEOF_SA_FAMILY_T` detection to non-Windows. - make sure `sys/socket.h` exists before detecting `SIZEOF_SA_FAMILY_T`. - limit `mach_absolute_time()` detection to `APPLE`. Drop from Windows pre-cache. - skip `HAVE_LIBSOCKET` detection for Windows, drop pre-cached value. - drop redundant pre-cached `HAVE_LIBZ` for Windows. - `curl_required_libpaths()`: stop accepting multiple arguments. To prepare for `CMAKE_REQUIRED_LINK_DIRECTORIES` support. Follow-up to 7bab201 curl#15193 - GSS: fix recent rebase mistakes: - fix variable name. - do not add a header twice. Follow-up to 91d451b curl#15157 - GSS: quote a variable. Closes curl#15271
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.
Replace
check_include_file_concat()withcheck_include_file()inGSS/LDAP detection to avoid these headers spilling into subsequent
feature checks.
For LDAP, reverse detection order to match with
./configure.Though, in current LDAP packages
ldap.hdoes includelber.h.For GSS, align header detection logic with
./configure, wheregssapi/gssapi_generic.hmight requiregssapi/gssapi.h, andgssapi/gssapi_krb5.hmight require both.Ref: #436
ldaptolibcurl.pcRequires:#15163