Skip to content

Commit

Permalink
allow BENCHMARK_VERSION to be undefined (#1769)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipDeegan committed Mar 21, 2024
1 parent 06b4a07 commit d5c55e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d5c55e8

Please sign in to comment.