allow BENCHMARK_VERSION to be undefined (#1769)

This commit is contained in:
PhilipDeegan 2024-03-21 12:29:38 +00:00 committed by GitHub
parent 06b4a07015
commit d5c55e8c42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -757,7 +757,13 @@ int InitializeStreams() {
} // end namespace internal } // end namespace internal
std::string GetBenchmarkVersion() { return {BENCHMARK_VERSION}; } std::string GetBenchmarkVersion() {
#ifdef BENCHMARK_VERSION
return {BENCHMARK_VERSION};
#else
return {""};
#endif
}
void PrintDefaultHelp() { void PrintDefaultHelp() {
fprintf(stdout, fprintf(stdout,