mesonbuild / google-benchmark

Meson build definitions for google-benchmark
https://github.com/google/benchmark
MIT License
0 stars 4 forks source link

Make benchmark-main depend on benchmark #4

Open hazelnusse opened 3 years ago

hazelnusse commented 3 years ago

Resolves #3

hazelnusse commented 3 years ago

@dcbaker I tested this via https://github.com/hazelnusse/meson_google_benchmark and I believe it resolves the issue. I also took the liberty of making some of they build file style more consistent.

jpakkane commented 3 years ago

This MR should be against the 1.5.2 branch. You need to rebase it on top of it. The upstream wrap file also needs a {provide] entry: https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section

dcbaker commented 3 years ago

I've tested this as well and it seems to be the correct fix. I've changed the base branch for you, so I think it's just the provides section left.

hazelnusse commented 3 years ago

@dcbaker @jpakkane I've opened a separate PR for the 1.4.1 branch here: https://github.com/mesonbuild/google-benchmark/pull/5

jpakkane commented 3 years ago

The dependency thing does not work yet. As per the docs:

This mechanism assumes the subproject calls meson.override_dependency('foo-1.0', foo_dep) so Meson knows which dependency object should be used as fallback.

Thus you should either add that override call and change the entries to point to the "dependency name rather than the object that holds them. Or just do this:

[provide]
google-benchmark = google_benchmark_dep
google-benchmark-main = google_benchmark_main_dep
eli-schwartz commented 3 years ago

ping?