[CMAKE] Add CMake scripts to find or fetch curl and find zlib#3526
Merged
marcalff merged 4 commits intoopen-telemetry:mainfrom Jul 15, 2025
Merged
[CMAKE] Add CMake scripts to find or fetch curl and find zlib#3526marcalff merged 4 commits intoopen-telemetry:mainfrom
marcalff merged 4 commits intoopen-telemetry:mainfrom
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:
|
owent
reviewed
Jul 11, 2025
There was a problem hiding this comment.
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::libcurlandZLIB::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 |
owent
approved these changes
Jul 15, 2025
malkia
added a commit
to malkia/opentelemetry-cpp
that referenced
this pull request
Jul 15, 2025
[CMAKE] Add CMake scripts to find or fetch curl and find zlib (open-telemetry#3526)
3 tasks
1 task
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.
Fixes # (issue)
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes