Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
c9c901b8
Commit
c9c901b8
authored
Jan 14, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix glog name problem in cmake
parent
1aeef03c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
CMakeLists.txt
CMakeLists.txt
+1
-1
config.h.in
config.h.in
+1
-1
vlog_service.cpp
src/brpc/builtin/vlog_service.cpp
+1
-1
vlog_service.h
src/brpc/builtin/vlog_service.h
+3
-3
server.cpp
src/brpc/server.cpp
+1
-1
logging.cc
src/butil/logging.cc
+2
-2
logging.h
src/butil/logging.h
+3
-3
No files found.
CMakeLists.txt
View file @
c9c901b8
...
...
@@ -80,7 +80,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-D
BRPC_
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"
)
...
...
config.h.in
View file @
c9c901b8
#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
src/brpc/builtin/vlog_service.cpp
View file @
c9c901b8
...
...
@@ -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
...
...
src/brpc/builtin/vlog_service.h
View file @
c9c901b8
...
...
@@ -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
src/brpc/server.cpp
View file @
c9c901b8
...
...
@@ -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
;
...
...
src/butil/logging.cc
View file @
c9c901b8
...
...
@@ -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
src/butil/logging.h
View file @
c9c901b8
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment