Commit c9c901b8 authored by zhujiashun's avatar zhujiashun

fix glog name problem in cmake

parent 1aeef03c
......@@ -80,7 +80,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()
endif()
set(CMAKE_CPP_FLAGS "${DEFINE_CLOCK_GETTIME} -DBRPC_WITH_GLOG=${WITH_GLOG_VAL} -DGFLAGS_NS=${GFLAGS_NS}")
set(CMAKE_CPP_FLAGS "${DEFINE_CLOCK_GETTIME} -DWITH_GLOG=${WITH_GLOG_VAL} -DGFLAGS_NS=${GFLAGS_NS}")
set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBRPC_REVISION=\\\"${BRPC_REVISION}\\\" -D__STRICT_ANSI__")
set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} ${DEBUG_SYMBOL} ${THRIFT_CPP_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer")
......
#ifndef BUTIL_CONFIG_H
#define BUTIL_CONFIG_H
#cmakedefine BRPC_WITH_GLOG @WITH_GLOG_VAL@
#cmakedefine WITH_GLOG @WITH_GLOG_VAL@
#endif // BUTIL_CONFIG_H
......@@ -14,7 +14,7 @@
// Authors: Ge,Jun (gejun@baidu.com)
#if !BRPC_WITH_GLOG
#if !WITH_GLOG
#include "brpc/log.h"
#include "brpc/controller.h" // Controller
......
......@@ -17,11 +17,11 @@
#ifndef BRPC_VLOG_SERVICE_H
#define BRPC_VLOG_SERVICE_H
#if !BRPC_WITH_GLOG
#if !WITH_GLOG
#include <ostream>
#include "brpc/builtin_service.pb.h"
namespace brpc {
class VLogService : public vlog {
......@@ -35,6 +35,6 @@ public:
} // namespace brpc
#endif // BRPC_WITH_GLOG
#endif // WITH_GLOG
#endif //BRPC_VLOG_SERVICE_H
......@@ -497,7 +497,7 @@ int Server::AddBuiltinServices() {
return -1;
}
#if !BRPC_WITH_GLOG
#if !WITH_GLOG
if (AddBuiltinService(new (std::nothrow) VLogService)) {
LOG(ERROR) << "Fail to add VLogService";
return -1;
......
......@@ -17,7 +17,7 @@
#include "butil/logging.h"
#if !BRPC_WITH_GLOG
#if !WITH_GLOG
#if defined(OS_WIN)
#include <io.h>
......@@ -1440,4 +1440,4 @@ std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
return out << butil::WideToUTF8(std::wstring(wstr));
}
#endif // BRPC_WITH_GLOG
#endif // WITH_GLOG
......@@ -20,7 +20,7 @@
#ifndef BUTIL_LOGGING_H_
#define BUTIL_LOGGING_H_
#include "butil/config.h" // BRPC_WITH_GLOG
#include "butil/config.h" // WITH_GLOG
#include <inttypes.h>
#include <string>
......@@ -30,7 +30,7 @@
#include "butil/atomicops.h" // Used by LOG_EVERY_N, LOG_FIRST_N etc
#include "butil/time.h" // gettimeofday_us()
#if BRPC_WITH_GLOG
#if WITH_GLOG
# include <glog/logging.h>
# include <glog/raw_logging.h>
// define macros that not implemented in glog
......@@ -1096,7 +1096,7 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) {
// 4 -- [default] LOG(ERROR) at runtime
// 5 -- LOG(ERROR) at runtime, only once per call-site
#endif // BRPC_WITH_GLOG
#endif // WITH_GLOG
#ifndef NOTIMPLEMENTED_POLICY
#if defined(OS_ANDROID) && defined(OFFICIAL_BUILD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment