open-telemetry / open-telemetry/opentelemetry-cpp

[CMAKE] Clean up pkgconfig install methods and add tests

Open
#4,503 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

triage/accepted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

Background:

This issue is to track work addressing https://github.com/open-telemetry/opentelemetry-cpp/pull/3829#issuecomment-3815122830

The opentelemetry_add_pkgconfig CMake function creates and installs pkgconfig files per CMake target.

Currently this method is invoked for each target with the target name, a description, and dependencies. The corresponding pkgconfig files are only superficially verified in CI and are not used to compile any tests or examples. Regressions in pkgconfig support can be easily missed.

The otel_add_component function creates the install components for the opentelemetry-cpp CMake package. This method can be updated to accept a description and to create the pkgconfig files for each target in the component.

Scope:
  1. Add a description arg to otel_add_component
  2. Add the pkgconfig file install functionality to otel_add_component
  3. Add a CMake based pkgconfig test for the generated pkgconfig files against the install test files (./install/test/src)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the CMake definitions of otel_add_component and opentelemetry_add_pkgconfig, then inspect the install test files under ./install/test/src. Add the component description and pkgconfig installation behavior described in the scope, and create a CMake-based test that uses the generated pkgconfig files against those install tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.