open-telemetry / open-telemetry/opentelemetry-cpp

[CMake Build] Install necessary header files only?

Open
#1,980 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug do-not-stale good first issue help wanted
Dominant language
C++
Stars
1.4k
Forks
632
Avg merge
1d 13h
Merged PRs (30d)
75

Description

Follow up for https://github.com/open-telemetry/opentelemetry-cpp/pull/1932#issuecomment-1426604348

we install all headers when we run cmake --install now.In my understanding, is it better to select a subset of headers to install(all exported classes and their dependencies). Maybe we can also improve it in another PR.

For cmake, we install header files as below, @owent, do you think we should list the files to install explicitly instead of relying on pattern with wildcard?

https://github.com/open-telemetry/opentelemetry-cpp/blob/6f0a30ee1c2882f6ae93f252fd9b35c358cc95be/api/CMakeLists.txt#L24-L29

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 with the installation rules in api/CMakeLists.txt around lines 24–29 and review the linked pull request discussion. Determine which exported headers and dependencies should be installed and whether the current wildcard should be replaced with an explicit list. Done means cmake --install installs the intended public headers without unnecessary files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.