Skip to content

Commit

Permalink
set library version in bazel (#1746)
Browse files Browse the repository at this point in the history
* set library version in bazel
  • Loading branch information
dmah42 authored Jan 29, 2024
1 parent 17bc235 commit 30a37e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cc_library(
}),
defines = [
"BENCHMARK_STATIC_DEFINE",
"BENCHMARK_VERSION=\\\"" + (module_version() if module_version() != None else "") + "\\\"",
] + select({
":perfcounters": ["HAVE_LIBPFM"],
"//conditions:default": [],
Expand Down
8 changes: 1 addition & 7 deletions src/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,7 @@ int InitializeStreams() {

} // end namespace internal

std::string GetBenchmarkVersiom() {
#if defined(BENCHMARK_VERSION)
return {BENCHMARK_VERSION};
#else
return "hello, bazel!";
#endif
}
std::string GetBenchmarkVersiom() { return {BENCHMARK_VERSION}; }

void PrintDefaultHelp() {
fprintf(stdout,
Expand Down

0 comments on commit 30a37e1

Please # to comment.