[CMAKE] Add support for CMake component deprecation and update the policy#4272
[CMAKE] Add support for CMake component deprecation and update the policy#4272dbarker wants to merge 13 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4272 +/- ##
=======================================
Coverage 81.25% 81.25%
=======================================
Files 446 446
Lines 18872 18872
=======================================
Hits 15332 15332
Misses 3540 3540 🚀 New features to boost your workflow:
|
…ake file. Add test for component deprecation. Update ci scripts to support running the tests. Add the tests to the cmake.install CI workflow. Address review feedback - set old_component_FOUND when the new name is resolved
Thanks @lalitb. I've addressed the feedback. To add the small test I've moved the existing install "usage tests" into an |
… changed the structure of the message.
Fixes # (issue)
The project provides CMake components in the installed package for use with
find_package(opentelemetry-cpp COMPONENTS ...). The names of the components and targets they import are user facing and need a path for deprecation as things change.Some use cases for this include:
The config builder components can be merged with the exporter components they depend on since they bring in no new dependencies.
This PR adds support to the
otel_install_componentCMake function for renaming and merging components while deprecating old component names. Users who callfind_packageon a deprecated component name will see a deprecation warning while the old component name resolves to the new component name.This change is a part of #4240 and tested in that PR.
Changes
otel_install_componentfunctionFor significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes