-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
cmake: extend zlib's AUTO
option to brotli, zstd and enable if found
#15431
Closed
Conversation
This file contains 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
vszakats
added
cmake
feature-window
A merge of this requires an open feature window
labels
Oct 28, 2024
vszakats
force-pushed
the
cm-extend-AUTO-option-1
branch
3 times, most recently
from
October 28, 2024 15:46
fbdc10e
to
403c331
Compare
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 31, 2024
With `find_package(... REQUIRED)` the configuration fails and exits if the package is not found. The `..._FOUND` check afterwards always evaluates true and safe to delete. Also true for brotli and zstd, but those are addressed differently via curl#15431.
vszakats
force-pushed
the
cm-extend-AUTO-option-1
branch
3 times, most recently
from
November 28, 2024 12:01
a332aab
to
2c8ade3
Compare
vszakats
changed the title
cmake: extend
cmake: extend zlib's Dec 16, 2024
AUTO
option to brotli, zstdAUTO
option to brotli, zstd
vszakats
force-pushed
the
cm-extend-AUTO-option-1
branch
from
December 17, 2024 01:38
2c8ade3
to
751e4a4
Compare
Probably requires curl#15408
try re-syncing configure-vs-cmake disable brotli cmake detects brotlicommon and brotlidec (which is a case of overlinking, to avoid breaking builds where both static and shared libs are offered and reading the shared libset from pkg-config, but ending up linking the static libs by default.)
vszakats
force-pushed
the
cm-extend-AUTO-option-1
branch
from
December 17, 2024 02:25
751e4a4
to
69cda1b
Compare
vszakats
changed the title
cmake: extend zlib's
cmake: extend zlib's Dec 17, 2024
AUTO
option to brotli, zstdAUTO
option to brotli, zstd and enable if found
This triggered the revert of #15005, which enabled It's possible to fix without reverting, but it was a signal how fragile really |
5 tasks
vszakats
added a commit
that referenced
this pull request
Jan 20, 2025
…vcpkg iOS: - add jobs with autotools, CMake, CMake Xcode generator. The Xcode generator is >10x slower than Unix Makefiles. Keep it because it's the one recommended by CMake and for having its own quirks we may want to know about. - build, cache and use LibreSSL for these jobs. With workaround for an iOS build issue fixed in master. - make Xcode generator work by explicitly disabling code signing. - make tests and examples build with the Xcode generator by setting `-DMACOSX_BUNDLE_GUI_IDENTIFIER=se.curl`, to avoid "Bundle identifier is missing" errors. - cmake: disable `CURL_USE_PKGCONFIG` by default for Apple device. - cmake: add `stdc++` library for BoringSSL and AWS-LC, with `OPENSSL_USE_STATIC_LIBS=ON` set. - cmake: add workaround for Xcode generator issue, where it cannot handle two targets depending on one custom command. A better fix may be dropping `tool_hugehelp.c` and `tool_ca_embed.c` from curltool library. For a future PR. Android: - add vcpkg to Android jobs, enable dependencies. Assisted-by: Tal Regev via #16045 - make vcpkg work with autotools. - pass `--with-brotli` to autotools to detect the vcpkg-supplied brotli. - enable BoringSSL for Android and add a job with it. - silence 457 CMake configure warnings about the Android NDK CMake scripts targeting freshly deprecated CMake versions. These were much more involved than imagined. Basically nothing works out of the box, and when combined, everything becomes a unique edge case. autotools builds were a much easier to make work than CMake ones. Also: - GHA/non-native: re-sync names to be shorter and more aligned with other workflows. - GHA: add `persist-credentials: false` where missing. Unresolved issues: - `OPENSSL_ROOT_DIR` ignored/mis-used when pointing it to LibreSSL. CMake seems to prepend the sysroot to the passed absolute directory. Found no workaround. - CMake when combined with Android, both the Google-recommended method and the built-in CMake method fail to provide a way to avoid `pkg-config` packages at system directories. Failed to find a knob that can remove `/usr/include` from the search path. The workaround is to disable zstd. (I enabled it by default in this release, maybe premature?: f2adb3b #15431) Disabling `pkg-config` doesn't work because vcpkg dependencies do not link without it. - CMake's Xcode generator is slow because each `try_compile()` feature check springs a new CMake + Xcode project taking a long time to run, just to compile single-liner C files. A known issue, with no solution. `-DCMAKE_MACOSX_BUNDLE=OFF` did not help, limiting build types to a single one (e.g. `Debug`) also had no effect. make | Xcode | GHA run :---- | :---- | :-------------------------------------------------------------------- 16s | 2m57s | https://github.com/curl/curl/actions/runs/12866334102/job/35868712426 23s | 4m13s | https://github.com/curl/curl/actions/runs/12868128013/job/35874212461 16s | 3m39s | https://github.com/curl/curl/actions/runs/12859073531/job/35849041880 14s | 2m23s | https://github.com/curl/curl/actions/runs/12858298423/job/35847201313 15s | 2m36s | https://github.com/curl/curl/actions/runs/12858058492/job/35846669761 19s | 3m19s | https://github.com/curl/curl/actions/runs/12868919430/job/35876601168 Closes #16043
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
make
curl_dependency_option()
more generic.extend
CURL_BROTLI
andCURL_ZSTD
options to acceptAUTO
in addition to existingON
andOFF
.change
CURL_BROTLI
andCURL_ZSTD
option defaultto
AUTO
. Was:OFF
.It brings cmake behavior closer to
./configure
.Still different:
./configure
defaults tooff
which means to check defaultlocations. cmake checks more locations by default.
(Also tried
NO_CMAKE_PATH
, but then it checked less locations.)brotlicommon
andbrotlidec
libs,while
./configure
only returns the latter.ci: drop explicit cmake options, that are now unnecessary.
GHA/configure-vs-cmake: make adjustments to make tests pass.
pkg-config
detection for remaining Find modules #15408.