opentelemetry-cpp
opentelemetry-cpp copied to clipboard
Resolve dependencies in opentelemetry-cpp-config.cmake
Before this change, consumers of the exported CMake targets had to know which dependencies are needed to get the transitive target dependencies like absl::*, gRPC::grpc++, or protobuf::libprotobuf.
Fixes # (issue)
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
- [ ]
CHANGELOG.mdupdated for non-trivial changes - [ ] Unit tests have been added
- [ ] Changes in public API reviewed
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: tobim (6252f46cf88a4b5d1db1b311535b6f0137bc049c, b92f316d96d9e5e8355df4b93ef1fd8703df4319)
- :white_check_mark: login: marcalff / name: Marc Alff (34de4847041f474a02669dc398732451aadeef98)
- :white_check_mark: login: lalitb / name: Lalit Kumar Bhasin (7225046b914332845fe8028938db4a3ae68f2dbd)
Deploy Preview for opentelemetry-cpp-api-docs canceled.
| Name | Link |
|---|---|
| Latest commit | 7225046b914332845fe8028938db4a3ae68f2dbd |
| Latest deploy log | https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/67211cfe9f75e50009cc4ab5 |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.91%. Comparing base (
497eaf4) to head (7225046). Report is 150 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #3094 +/- ##
==========================================
+ Coverage 87.12% 87.91% +0.79%
==========================================
Files 200 195 -5
Lines 6109 6133 +24
==========================================
+ Hits 5322 5391 +69
+ Misses 787 742 -45
find_package will produce warning when it's called recursively.
Shoud we just add warnings to let users call find_package for dependencies before otel-cpp?
find_packagewill produce warning when it's called recursively.
What warnings? Calling find_package or find_dependency in config files is standard practice.
I now realize that my earlier response might has come across as rude, which I did not intend.
Please take a look at the docs for find_dependency here.
Quoting:
It is designed to be used in a Package Configuration File (<PackageName>Config.cmake).
May I humbly request that you take another look?
find_packagewill produce warning when it's called recursively.What warnings? Calling
find_packageorfind_dependencyin config files is standard practice.
Sorry, calling find_package recursively with FindXXX.cmake will produce warnings, but won't with CONFIG package. Could you please also add find_dependency for OpenTracing, prometheus-cpp, CURL and ZLIB ?
Thanks for the heads-up! I added the rest.
Afaics CURL and ZLIB are only necessary when opentelemetry_http_client_curl is built as a static library, so I guarded that with NOT BUILD_SHARED_LIBS.