diff options
author | PhilipDeegan <philip.deegan@gmail.com> | 2024-03-21 12:29:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 15:29:38 +0300 |
commit | d5c55e8c42a8782cb24f6011d0e88449237ab842 (patch) | |
tree | 5e55a96b880fda52bcf3ba98669b4b3947cfb5d5 | |
parent | 06b4a070156a9333549468e67923a3a16c8f541b (diff) | |
download | google-benchmark-d5c55e8c42a8782cb24f6011d0e88449237ab842.tar.gz |
allow BENCHMARK_VERSION to be undefined (#1769)
-rw-r--r-- | src/benchmark.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/benchmark.cc b/src/benchmark.cc index 1f2f6cc..337bb3f 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, |