Add Redis info to the --version printout

This commit is contained in:
m
2019-03-29 08:10:58 +01:00
parent bed2b8b387
commit 85a4f2810b
+8
View File
@@ -30,6 +30,10 @@
#include <wrappers/msvc_wrapper.hpp>
#include <wrappers/program_wrapper.hpp>
#ifdef ENABLE_REDIS
#include <hiredis/hiredis.h>
#endif
#include <iostream>
#include <memory>
#include <stdexcept>
@@ -162,6 +166,10 @@ std::unique_ptr<bcache::program_wrapper_t> find_suitable_wrapper(
[[noreturn]] void print_version_and_exit() {
std::cout << "BuildCache version " BUILDCACHE_VERSION_STRING "\n";
#ifdef ENABLE_REDIS
std::cout << "Redis support via hiredis " << HIREDIS_MAJOR << "." << HIREDIS_MINOR << "."
<< HIREDIS_PATCH << "\n";
#endif // ENABLE_REDIS
std::exit(0);
}