Build pass without glog

This commit is contained in:
John Zhao
2018-09-04 16:07:36 +08:00
parent 02856194a0
commit 94ecacef6c
5 changed files with 50 additions and 2 deletions

View File

@@ -15,6 +15,8 @@
#define MYNTEYE_LOGGER_H_
#pragma once
#ifdef WITH_GLOG
#include <glog/logging.h>
/** Helper to init glog with args. */
@@ -62,4 +64,34 @@ struct glog_init {
}
};
#else
#include <iostream>
struct glog_init {
glog_init(int argc, char *argv[]) {
(void)argc;
(void)argv;
}
};
#define LOG(severity) std::cout
#define LOG_IF(severity, condition) std::cout
#define VLOG(verboselevel) std::cout
#define VLOG_IS_ON(verboselevel) false
#define CHECK(val) std::cout
#define CHECK_EQ(val1, val2) std::cout
#define CHECK_NE(val1, val2)
#define CHECK_LE(val1, val2)
#define CHECK_LT(val1, val2)
#define CHECK_GE(val1, val2)
#define CHECK_GT(val1, val2)
#define CHECK_NOTNULL(val)
#endif
#endif // MYNTEYE_LOGGER_H_