Skip to content

Commit d5c55e8

Browse files
authored
allow BENCHMARK_VERSION to be undefined (#1769)
1 parent 06b4a07 commit d5c55e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/benchmark.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,13 @@ int InitializeStreams() {
757757

758758
} // end namespace internal
759759

760-
std::string GetBenchmarkVersion() { return {BENCHMARK_VERSION}; }
760+
std::string GetBenchmarkVersion() {
761+
#ifdef BENCHMARK_VERSION
762+
return {BENCHMARK_VERSION};
763+
#else
764+
return {""};
765+
#endif
766+
}
761767

762768
void PrintDefaultHelp() {
763769
fprintf(stdout,

0 commit comments

Comments
 (0)