Skip to content

Allow to build library without tests and examples#367

Merged
reyang merged 2 commits into
open-telemetry:masterfrom
avsej:master
Oct 18, 2020
Merged

Allow to build library without tests and examples#367
reyang merged 2 commits into
open-telemetry:masterfrom
avsej:master

Conversation

@avsej
Copy link
Copy Markdown
Contributor

@avsej avsej commented Oct 16, 2020

  • tests for memory exporters are not guarded by BUILD_TESTING
  • include(CTest) itself, with internally defines BUILD_TESTING have to be optional
  • expose WITH_EXAMPLES option to allow skipping examples

@avsej avsej requested a review from a team October 16, 2020 16:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 16, 2020

Codecov Report

Merging #367 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #367   +/-   ##
=======================================
  Coverage   94.91%   94.91%           
=======================================
  Files         155      155           
  Lines        6882     6882           
=======================================
  Hits         6532     6532           
  Misses        350      350           

@avsej
Copy link
Copy Markdown
Contributor Author

avsej commented Oct 16, 2020

completed cmake-format -i on both files, hopefully it will make CI happy

@avsej
Copy link
Copy Markdown
Contributor Author

avsej commented Oct 16, 2020

@reyang @ThomsonTan @pyohannes, could you help me with your cmake-format setup? your project does not have .cmake-format.yaml and it seems like CI is using some pretty old version of cmake-format. Feel free to update my patch if necessary, I just want to use the library but don't want to build and run testsuite.

@lalitb
Copy link
Copy Markdown
Member

lalitb commented Oct 16, 2020

@reyang @ThomsonTan @pyohannes, could you help me with your cmake-format setup? your project does not have .cmake-format.yaml and it seems like CI is using some pretty old version of cmake-format. Feel free to update my patch if necessary, I just want to use the library but don't want to build and run testsuite.

Buildifier is used for formatting. you need to first install it by running this script, and then do formatting using ci/do-ci.sh format from here. Ensure to commit formatted file.

@avsej
Copy link
Copy Markdown
Contributor Author

avsej commented Oct 16, 2020

Thank you, @lalitb. Now it looks good. The problem was really in that the CI is using outdated cmake-format.

@ThomsonTan
Copy link
Copy Markdown
Contributor

What's the current stable version of cmake-format? Perhaps we should upgrade it to avoid such kind of spurious CI failure.

@avsej
Copy link
Copy Markdown
Contributor Author

avsej commented Oct 16, 2020

cmake-format 0.6.13
https://pypi.org/project/cmake-format/

@reyang reyang merged commit bfd7e02 into open-telemetry:master Oct 18, 2020
kxyr pushed a commit to open-o11y/opentelemetry-cpp that referenced this pull request Oct 20, 2020
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants