Repository navigation
Conversation
vszakats
force-pushed
the
cm-facetidy
branch
4 times, most recently
from
April 24, 2025 00:05
f874095 to
a0e689f
Compare
9 tasks done
This was referenced Apr 25, 2025
vszakats
added a commit
that referenced
this pull request
Apr 25, 2025
Replace `list(PREPEND ...)` for compatibility with CMake < 3.15. Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend Follow-up to 82b09f9 #1322 Cherry-picked from #1581 Closes #1586
vszakats
added a commit
that referenced
this pull request
Apr 25, 2025
…ming libcurl with old cmake Fixes: ``` CMake Error at bld-libssh2/_pkg/lib/cmake/libssh2/libssh2-config.cmake:35 (add_library): add_library cannot create ALIAS target "libssh2::libssh2" because target "libssh2::libssh2_shared" is imported but not globally visible. Call Stack (most recent call first): CMakeLists.txt:27 (find_package) CMake Error at bld-libssh2/_pkg/lib/cmake/libssh2/libssh2-config.cmake:40 (add_library): add_library cannot create ALIAS target "Libssh2::libssh2" because target "libssh2::libssh2_shared" is imported but not globally visible. Call Stack (most recent call first): CMakeLists.txt:27 (find_package) ``` tests/cmake reproducer (requires #1581): ```shell export CMAKE_CONSUMER=/path/to/CMake-3.12.0/bin/cmake ./test.sh find_package ``` I don't understand what this error says, why it happens in certain CMake versions, and why a workaround is necessary for what seems like a standard export/consume configuration. This patch is based on internet suggestions and other projects ending up with this workaround. Ref: curl/curl#16973 Ref: curl/curl#17140 Cherry-picked from #1581 Closes #1587
IMPORTED target improvements and fixes
vszakats
added a commit
that referenced
this pull request
Apr 27, 2025
- ci/GHA: add cmake integration tests for Windows. - ci/GHA: test `add_subdirectory` with Libgcrypt. - make them run faster with prefill, unity, Ninja, omitting curl tool. - add support for any build configuration. - add old-cmake support with auto-detection. - auto-detect Ninja. - run consumer test apps to see if they work. Also show the cryptography backend. - add support for Windows. - make it more verbose. - re-add `ExternalProject` cmake consumer test. It's broken. - tidy up terminology. Cherry-picked from #1581 Closes #1589
vszakats
added a commit
to curl/curl
that referenced
this pull request
Nov 29, 2025
Rework the way curl's custom Find modules advertise their properties. Before this patch, Find modules returned detected dependency properties (header dirs, libs, libdirs, C flags, etc.) via global variables. curl's main `CMakeLists.txt` copied their values into global lists, which it later applied to targets. This solution worked internally, but it was unsuited for the public, distributed `CURLConfig.cmake` and publishing curl's Find modules with it, due to polluting the namespace of consumer projects. It's also impractical to apply the many individual variables to every targets depending on libcurl. To allow using Find modules in consumer projects, this patch makes them define as imported interface targets, named `CURL::<dependency>`. Then store dependency information as target properties. It avoids namespace pollution and makes the dependency information apply automatically to all targets using `CURL::libcurl_static`. Find modules continue to return `*_FOUND` and `*_VERSION` variables. For dependencies detected via `pkg-config`, CMake 3.16+ is recommended. Older CMake versions have a varying degree of support for propagating/handling library directories. This may cause issues in envs where dependencies reside in non-system locations and detected via `pkg-config` (e.g. macOS + Homebrew). Use `CURL_USE_PKGCONFIG=OFF` to fix these issues. Or upgrade to newer CMake, or link libcurl dynamically. Also: - re-enable `pkg-config` for old cmake `find_library()` integration tests. - make `curlinfo` build after these changes. - distribute local Find modules. - export the raw list of lib dependencies via `CURL_LIBRARIES_PRIVATE`. - `CURLconfig.cmake`: use curl's Find modules to detect dependencies in the consumer env. - add custom property to target property debug function. - the curl build process no longer modifies `CMAKE_C_FLAGS`. Follow-up to e865420 #17047 Ref: #14930 Ref: libssh2/libssh2#1535 Ref: libssh2/libssh2#1571 Ref: libssh2/libssh2#1581 Ref: libssh2/libssh2#1623 Closes #16973
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.
add_subdirectorybuilds for old CMake versions.(mainly to sync with curl.)
Follow-up to a0d8529 #1571
Follow-up to df0563a #1535