google / benchmark

A microbenchmark support library
Apache License 2.0
8.69k stars 1.59k forks source link

[FR] Harmonize all BENCHMARK_* macros #1570

Closed HFTrader closed 1 year ago

HFTrader commented 1 year ago

Most os/compiler specific BENCHMARK_* macros are defined either in benchmark/benchmark.h or in src/internal_macros.h. However there are a few that are defined scattered throughout the source files.

Examples:

include/benchmark/export.h:#define BENCHMARK_DEPRECATED
include/benchmark/export.h:#define BENCHMARK_DEPRECATED_EXPORT
include/benchmark/export.h:#define BENCHMARK_DEPRECATED_NO_EXPORT
include/benchmark/export.h:#define BENCHMARK_EXPORT
include/benchmark/export.h:#define BENCHMARK_NO_EXPORT
src/check.h:#define BENCHMARK_NOEXCEPT
src/check.h:#define BENCHMARK_NOEXCEPT_OP
src/log.h:#define BENCHMARK_HAS_CXX11
src/sysinfo.cc:#define BENCHMARK_HAS_SYSCTL
test/benchmark_test.cc:#define BENCHMARK_NOINLINE

Those should probably be moved

HFTrader commented 1 year ago

Silly idea