1
0
mirror of https://github.com/google/benchmark.git synced 2025-04-17 23:12:30 +08:00

allow BENCHMARK_VERSION to be undefined

This commit is contained in:
dekken 2024-03-20 18:22:00 +01:00
parent 06b4a07015
commit 2bf1db6912

View File

@ -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,