Skip to content

OpenTelemetry's cmake file claims to publish OPENTELEMETRY_CPP_FOUND/etc. but really publishes OPENTELEMETRY-CPP_FOUND - with a dash. #2212

@niande-xbox

Description

@niande-xbox

Describe your environment
Users of this library will look at the CMAKE file cmake/opentelemetry-cpp-config.cmake.in (as did opentelemetry-cpp-contrib and try to use that target, but if you print CMAKE variables, you'll see that the _FOUND variable actually has the dash, which makes sense if you look at the find_package_handle_standard_args call at the bottom of this file.

Steps to reproduce
Print the CMAKE variables after running find_package(opentelemetry-cpp CONFIG QUIET), and you'll see: -- opentelemetry-cpp_FOUND=1 not -- opentelemetry_cpp_FOUND=1.

What is the expected behavior?
The documented CMAKE variables (which have an underscore rather than a dash) should match the actual CMAKE variables (with are with dashes).

What is the actual behavior?
They do not match.

Additional context
This leads to other dependent repos failing to include opentelemetry-cpp correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions