-
Notifications
You must be signed in to change notification settings - Fork 494
[CMAKE] Add CMake scripts to find or fetch curl and find zlib #3526
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] Add CMake scripts to find or fetch curl and find zlib #3526
Conversation
…. Test fetching curl in ci workflow
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
…tched from github
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3526 +/- ##
==========================================
- Coverage 90.01% 89.98% -0.02%
==========================================
Files 219 219
Lines 7044 7044
==========================================
- Hits 6340 6338 -2
- Misses 704 706 +2 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the CMake build system by adding dedicated scripts to find or fetch curl and zlib dependencies, replacing the legacy variable-based approach with modern CMake imported targets.
- Introduces new CMake scripts for curl and zlib dependency management with fallback to FetchContent
- Replaces legacy
${CURL_LIBRARIES}
and${ZLIB_LIBRARIES}
with modern imported targetsCURL::libcurl
andZLIB::ZLIB
- Updates CI configuration to test fetching curl from GitHub instead of using system packages
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
cmake/curl.cmake | New script to find or fetch curl with FetchContent fallback |
cmake/zlib.cmake | New script to find zlib with modern target support |
CMakeLists.txt | Reorganizes dependency detection and integrates new cmake scripts |
ext/src/http/client/curl/CMakeLists.txt | Simplifies curl linking by removing legacy target detection logic |
ext/test/http/CMakeLists.txt | Replaces complex curl target detection with direct CURL::libcurl usage |
ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt | Updates curl linking to use modern imported target |
exporters/zipkin/CMakeLists.txt | Updates curl linking to use modern imported target |
examples/http/CMakeLists.txt | Updates curl linking to use modern imported target |
.github/workflows/ci.yml | Removes libcurl4-openssl-dev from CI dependencies to test fetching |
[CMAKE] Add CMake scripts to find or fetch curl and find zlib (open-telemetry#3526)
Fixes # (issue)
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes