Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add possibility to ask for libbenchmark version number (#1004)" #1417

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions .bazelrc

This file was deleted.

19 changes: 0 additions & 19 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
licenses(["notice"])

load("//:config/generate_export_header.bzl", "generate_export_header")
load("//:config/generate_version_header.bzl", "generate_version_header")

# Generate header to provide ABI export symbols
generate_export_header(
Expand All @@ -10,23 +9,6 @@ generate_export_header(
static_define = "BENCHMARK_STATIC_DEFINE",
)

# Get the git version variables
py_binary(
name = "get_git_version",
srcs = ["config/get_git_version.py"],
python_version = "PY3"
)

# Generate version header
generate_version_header(
name = "generate_version_header",
git_version_name = "GIT_VERSION",
git_is_dirty_name = "GIT_IS_DIRTY",
default_version = "DEFAULT_VERSION",
header = "include/benchmark/version.h",
src = "include/version.h.in"
)

config_setting(
name = "qnx",
constraint_values = ["@platforms//os:qnx"],
Expand Down Expand Up @@ -57,7 +39,6 @@ cc_library(
hdrs = [
"include/benchmark/benchmark.h",
"include/benchmark/export.h", # From generate_export_header
"include/benchmark/version.h", # From generate_version_header
],
linkopts = select({
":windows": ["-DEFAULTLIB:shlwapi.lib"],
Expand Down
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,6 @@ if (BENCHMARK_ENABLE_LIBPFM)
find_package(PFM)
endif()

# Generate config file (currently only used for version num but may be expanded if needed.)
configure_file(${PROJECT_SOURCE_DIR}/include/version.h.in ${CMAKE_BINARY_DIR}/include/benchmark/version.h)

# Set up directories
include_directories(${PROJECT_SOURCE_DIR}/include)

Expand Down
30 changes: 0 additions & 30 deletions config/generate_version_header.bzl

This file was deleted.

99 changes: 0 additions & 99 deletions config/get_git_version.py

This file was deleted.

9 changes: 2 additions & 7 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,15 @@
* `git log $(git describe --abbrev=0 --tags)..HEAD` gives you the list of
commits between the last annotated tag and HEAD
* Pick the most interesting.
* Create one last commit that updates the version saved in `CMakeLists.txt`, the
`__version__` variable in `bindings/python/google_benchmark/__init__.py`
and the default version in `.bazelrc` to the release
* Create one last commit that updates the version saved in `CMakeLists.txt` and the
`__version__` variable in `bindings/python/google_benchmark/__init__.py`to the release
version you're creating. (This version will be used if benchmark is installed from the
archive you'll be creating in the next step.)

```
project (benchmark VERSION 1.6.0 LANGUAGES CXX)
```

```
build --workspace_status_command "python workspace_status.py --default_version "1.6.1""
```

```python
# bindings/python/google_benchmark/__init__.py

Expand Down
6 changes: 0 additions & 6 deletions include/version.h.in

This file was deleted.

4 changes: 0 additions & 4 deletions src/json_reporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <vector>

#include "benchmark/benchmark.h"
#include "benchmark/version.h"
#include "complexity.h"
#include "string_util.h"
#include "timers.h"
Expand Down Expand Up @@ -125,9 +124,6 @@ bool JSONReporter::ReportContext(const Context& context) {
std::string walltime_value = LocalDateTimeString();
out << indent << FormatKV("date", walltime_value) << ",\n";

out << indent << FormatKV("libbenchmark version", LIBBENCHMARK_VERSION)
<< ",\n";

out << indent << FormatKV("host_name", context.sys_info.name) << ",\n";

if (Context::executable_name) {
Expand Down
3 changes: 1 addition & 2 deletions src/reporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <vector>

#include "benchmark/benchmark.h"
#include "benchmark/version.h"
#include "check.h"
#include "string_util.h"
#include "timers.h"
Expand All @@ -44,7 +43,7 @@ void BenchmarkReporter::PrintBasicContext(std::ostream *out,

if (context.executable_name)
Out << "Running " << context.executable_name << "\n";
Out << "libbenchmark version: " << LIBBENCHMARK_VERSION << "\n";

const CPUInfo &info = context.cpu_info;
Out << "Run on (" << info.num_cpus << " X "
<< (info.cycles_per_second / 1000000.0) << " MHz CPU "
Expand Down
2 changes: 0 additions & 2 deletions test/reporter_output_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ static int AddContextCases() {
{
{"^%int-%int-%intT%int:%int:%int[-+]%int:%int$", MR_Default},
{"Running .*(/|\\\\)reporter_output_test(\\.exe)?$", MR_Next},
{"libbenchmark version: %int\\.%int\\.%int", MR_Next},
{"Run on \\(%int X %float MHz CPU s?\\)", MR_Next},
});
AddCases(TC_JSONOut,
{{"^\\{", MR_Default},
{"\"context\":", MR_Next},
{"\"date\": \"", MR_Next},
{"\"libbenchmark version\":", MR_Next},
{"\"host_name\":", MR_Next},
{"\"executable\": \".*(/|\\\\)reporter_output_test(\\.exe)?\",",
MR_Next},
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test1_run1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test1_run2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test2_run.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test3_run0.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test3_run1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test4_run0.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
1 change: 0 additions & 1 deletion tools/gbench/Inputs/test4_run1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"context": {
"date": "2016-08-02 17:44:46",
"libbenchmark_version": "1.6.1",
"num_cpus": 4,
"mhz_per_cpu": 4228,
"cpu_scaling_enabled": false,
Expand Down
69 changes: 0 additions & 69 deletions workspace_status.py

This file was deleted.