opencensus-cpp icon indicating copy to clipboard operation
opencensus-cpp copied to clipboard

CMake followups

Open g-easy opened this issue 6 years ago • 5 comments

Experimental CMake support was added in PR #238 to address issue #86. This issue is to track followup work from the PR:

  • [x] Benchmarks. (#296)
  • [ ] Top-level examples other than helloworld.
  • [ ] Leaf examples (e.g. trace/examples/ dir).
  • [ ] Exporters other than stdout.
    • [x] Prometheus (#249)
      • [ ] prometheus_test_server, ::pull, get an example to work.
    • [ ] Zipkin
    • [ ] Stackdriver
  • [x] CI (Travis) support. (#255)
  • [ ] CI (Appveyor) support.
  • [ ] Make it work with MSVC.
  • [ ] vcpkg support.
  • [ ] Consider producing shared libraries.
  • [ ] Add find_package / install support.
  • [ ] Precisely specify which link libraries are PRIVATE.
  • [ ] Consider using object libraries.

g-easy avatar Nov 29 '18 04:11 g-easy

While working on various changes (#284 and #283), I experimented with replacing the current ExternalProject with FetchContent. This works very well and reduces the amount of code substantially.

Are you interested in a PR with this (that is, replace ExternalProject with FetchContent? Since you have Bazel, requiring CMake >= 3.11 might be okay? :) (CMake 3.14 also got the super-simple function FetchContent_MakeAvailable which automatically handles dependency chains as well)

Then (because the amount of code is reduced) it will also be easier to implement an option to switch between FetchContent and find_package...

meastp avatar Feb 25 '19 12:02 meastp

I built all components with Debug (x64) and ran all 189 tests successfully on MSVC 2017 v15.9.7. 👍

I also built with RelWithDebugInfo (x64) - that only discovered 186 tests, and of the 186 tests, these 6 tests failed:

[26.02.2019 19.51.33 Informational] [ FAILED ] 6 tests, listed below: [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.BucketBoundary [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.GetStatsFuture [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.IncompleteFirstBucket [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.Shift [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.MergeIncompleteFirstBucket [26.02.2019 19.51.33 Informational] [ FAILED ] StatsObjectTest.SteadyStateDistribution

meastp avatar Feb 26 '19 18:02 meastp

I'm happy to replace ExternalProject with FetchContent. If you could please send a PR for this, that would be great.

If v3.11 becomes a problem for people, we can (later) try to import the FetchContent implementation like https://github.com/census-instrumentation/opencensus-cpp/pull/256#issuecomment-448406031 says.

n.b. Our Travis config specifies Trusty which ships with CMake 3.9.2, so maybe switch (only) the CMake build to Xenial for now.

g-easy avatar Feb 27 '19 01:02 g-easy

See #296 for benchmark support

meastp avatar Mar 14 '19 05:03 meastp

I am interested to use opencensus in one of my projects, but I would need the following:

Add find_package / install support.

Dlougach avatar Jun 01 '20 15:06 Dlougach