google / google/benchmark

[FR] Add a BUILD file for compare.py

Open
#987 1 comment 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
Currently, I cannot use `compare.py` using bazel. The use case scenario is when another repo depends on this repo (i.e. Google benchmark) by adding `[git_repository](https://docs.bazel.build/versions/master/repo/git.html#git_repository)` to its workspace which references Google benchmark's repo.

Bazel can compile and provides the `.h`files of Google benchmark's repo to the other repo, but currently it cannot do this for compare.py. It would be nice if one could use compare.py from another repo that references Google Benchmark using using `git_repository` through bazel.

**Describe the solution you'd like**
In my own repo, I can currently call:

```
bazel run --cxxopt='-std=c++17' benchmark_sort -c opt
```

I would like to be able to call something like this:

```
bazel run --cxxopt='-std=c++17' benchmark_compare -c opt
```

where this command calls the compare.py from google benchmark repo.

**Describe alternatives you've considered**
Copying /tool folder to my own repo. This is not ideal cause currently, I don't have to copy the rest of the repo. Bazel automatically does this using `git_repository` rule in `WORKSPACE` file.

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.