From d5c55e8c42a8782cb24f6011d0e88449237ab842 Mon Sep 17 00:00:00 2001 From: PhilipDeegan Date: Thu, 21 Mar 2024 12:29:38 +0000 Subject: [PATCH] allow BENCHMARK_VERSION to be undefined (#1769) --- src/benchmark.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/benchmark.cc b/src/benchmark.cc index 1f2f6cc2..337bb3fa 100644 --- a/src/benchmark.cc +++ b/src/benchmark.cc @@ -757,7 +757,13 @@ int InitializeStreams() { } // end namespace internal -std::string GetBenchmarkVersion() { return {BENCHMARK_VERSION}; } +std::string GetBenchmarkVersion() { +#ifdef BENCHMARK_VERSION + return {BENCHMARK_VERSION}; +#else + return {""}; +#endif +} void PrintDefaultHelp() { fprintf(stdout,