Repository navigation
Conversation
Like autotools does.
Also match path order used in autotools.
Cleaner compiler command-lines, with absolute header paths.
Workaround for older mbedtls versions and non-cmake mbedtls builds (as of mbedTLS 3.6.2) that don't emit an mbedcrypto.pc file.
Also update defaults for Android and Apple devices
This reverts commit e893b91. It's used by wolfssl's wolfcrypto library, but there wasn't any report missing this library.
vszakats
added a commit
that referenced
this pull request
Feb 3, 2025
CMake: - Find*: set `<modulename>_FOUND` for compatibility when found via `pkg-config`. E.g. `MbedTLS_FOUND`. `find_package_handle_standard_args()` sets both `<MODULENAME>_FOUND` and `<Modulename>_FOUND` when detecting the dependency. Some CMake code relies on this and 3rd-party code may rely on it too. Make sure to set the latter variant when detecting the dependency via `pkg-config`, where we don't call `find_package_handle_standard_args()`. CMake sets these variable to `TRUE` (not `ON` or `1`). Replicate this for compatibility. - libssh2-config.cmake: inherit default `LIBSSH2_USE_PKGCONFIG`. Follow-up to a3aa6b4 #1525 - document variables consumed by `libssh2-config.cmake.in`. - `libssh2-config.cmake`: fix to link to non-OpenSSL crypto backends. This is most likely not how this is supposed to be done, but better than failing. What's the canonical way to do this, and how OpenSSL and zlib does it is yet to be figured out. - use `ZLIB::ZLIB` to reference zlib. - use `IN ITEMS` where missed. - harmonize variable dump output formats. CMake `find_package` integration tests: - extend to all crypto backends (was: OpenSSL). - show libssh2 variables set by `find_package()`. - stop building examples and tests for the consumed package. For performance. - enable zlib, for coverage. - be verbose when building the test targets. ci/GHA: - add packaged mbedTLS (2.x) build to Linux matrix. - alphasort some tests. Follow-up to d9c2e55 #1460 Follow-up to 82b09f9 #1322 Closes #1534
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Apr 27, 2025
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Apr 27, 2025
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Apr 27, 2025
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Apr 27, 2025
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
Apr 28, 2025
vszakats
added a commit
to vszakats/libssh2
that referenced
this pull request
May 6, 2025
vszakats
added a commit
that referenced
this pull request
May 7, 2025
- cmake: sync `-ftree-vrp` behavior with autotools. - build: enable `-Wjump-misses-init` for GCC 4.5+. Credits-to: Marcel Raad - packet: fix `-Wjump-misses-init` warnings. ``` src/packet.c: In function ‘_libssh2_packet_add’: src/packet.c:671:9: error: jump skips variable initialization [-Werror=jump-misses-init] src/packet.c:920:31: note: ‘want_reply’ declared here src/packet.c:671:9: error: jump skips variable initialization [-Werror=jump-misses-init] src/packet.c:919:26: note: ‘len’ declared here src/packet.c:669:9: error: jump skips variable initialization [-Werror=jump-misses-init] src/packet.c:1121:31: note: ‘want_reply’ declared here src/packet.c:669:9: error: jump skips variable initialization [-Werror=jump-misses-init] src/packet.c:1120:26: note: ‘len’ declared here src/packet.c:669:9: error: jump skips variable initialization [-Werror=jump-misses-init] src/packet.c:1119:26: note: ‘channel’ declared here ``` - build: enable gcc-12/13+, clang-10+ picky warnings - acinclude.m4: sync formatting/comments with curl. - autotools: fix `-Wtrampolines` picky warning for gcc 4.x versions. Follow-up to 854cfa8 #1524 - cmake: enable `-Wall` for MSVC when `PICKY_COMPILER=ON`. - MSVC: fix `-Wall` warnings. Seen on VS2015. Not seen on VS2022. Unknown for other versions. ``` tests\test_simple.c(60): warning C4777: 'fprintf' : format string '%d' requires an argument of type 'int', but variadic argument 1 has type 'std::size_t' tests\test_simple.c(60): warning C4777: 'fprintf' : format string '%.*s' requires an argument of type 'int', but variadic argument 2 has type 'std::size_t' ``` - mbedtls: stop silencing warnings in 3rd-party header. Follow-up to a3aa6b4 #1525 - cmake: stop deleting `-W<n>` from `CMAKE_C_FLAGS` (MSVC) 1. `CMAKE_C_FLAGS` may apply to other projects, and deleting/altering it may be unexpected. 2. We pass `-W4`/`-Wall` internally now, which do override custom `-W<n>` options as tested with VS2008 and newer VS generators. Closes #1588
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.
LIBSSH2_USE_PKGCONFIGoption to control whether to usepkg-configto find dependencies..pcnames withing the Find modules.mbedcryptotolibssh2.pconly when detected viapkg-config.Workaround for older mbedtls versions and non-CMake mbedTLS builds
(as of mbedTLS 3.6.2) that don't emit an
mbedcrypto.pcfile.-isystemfor crypto backend and zlib header paths.To match autotools.
Cherry-picked from #1484