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
4c400a16
Unverified
Commit
4c400a16
authored
Jan 14, 2019
by
Ge Jun
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #620 from zyearn/fix_cmake_glog
fix glog name problem in cmake
parents
1aeef03c
6295344d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
+10
-7
CMakeLists.txt
CMakeLists.txt
+4
-4
config.h.in
config.h.in
+3
-0
vlog_service.cpp
src/brpc/builtin/vlog_service.cpp
+1
-1
vlog_service.h
src/brpc/builtin/vlog_service.h
+2
-2
No files found.
CMakeLists.txt
View file @
4c400a16
...
@@ -22,14 +22,14 @@ else()
...
@@ -22,14 +22,14 @@ else()
message
(
WARNING
"You are using an unsupported compiler! Compilation has only been tested with Clang and GCC."
)
message
(
WARNING
"You are using an unsupported compiler! Compilation has only been tested with Clang and GCC."
)
endif
()
endif
()
option
(
WITH_GLOG
"With glog"
OFF
)
option
(
BRPC_
WITH_GLOG
"With glog"
OFF
)
option
(
DEBUG
"Print debug logs"
OFF
)
option
(
DEBUG
"Print debug logs"
OFF
)
option
(
WITH_DEBUG_SYMBOLS
"With debug symbols"
ON
)
option
(
WITH_DEBUG_SYMBOLS
"With debug symbols"
ON
)
option
(
WITH_THRIFT
"With thrift framed protocol supported"
OFF
)
option
(
WITH_THRIFT
"With thrift framed protocol supported"
OFF
)
option
(
BUILD_UNIT_TESTS
"Whether to build unit tests"
OFF
)
option
(
BUILD_UNIT_TESTS
"Whether to build unit tests"
OFF
)
set
(
WITH_GLOG_VAL
"0"
)
set
(
WITH_GLOG_VAL
"0"
)
if
(
WITH_GLOG
)
if
(
BRPC_
WITH_GLOG
)
set
(
WITH_GLOG_VAL
"1"
)
set
(
WITH_GLOG_VAL
"1"
)
endif
()
endif
()
...
@@ -121,7 +121,7 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
...
@@ -121,7 +121,7 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
message
(
FATAL_ERROR
"Fail to find leveldb"
)
message
(
FATAL_ERROR
"Fail to find leveldb"
)
endif
()
endif
()
if
(
WITH_GLOG
)
if
(
BRPC_
WITH_GLOG
)
find_path
(
GLOG_INCLUDE_PATH NAMES glog/logging.h
)
find_path
(
GLOG_INCLUDE_PATH NAMES glog/logging.h
)
find_library
(
GLOG_LIB NAMES glog
)
find_library
(
GLOG_LIB NAMES glog
)
if
((
NOT GLOG_INCLUDE_PATH
)
OR
(
NOT GLOG_LIB
))
if
((
NOT GLOG_INCLUDE_PATH
)
OR
(
NOT GLOG_LIB
))
...
@@ -165,7 +165,7 @@ set(DYNAMIC_LIB
...
@@ -165,7 +165,7 @@ set(DYNAMIC_LIB
)
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz"
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz"
)
if
(
WITH_GLOG
)
if
(
BRPC_
WITH_GLOG
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
${
GLOG_LIB
}
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
${
GLOG_LIB
}
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lglog"
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lglog"
)
endif
()
endif
()
...
...
config.h.in
View file @
4c400a16
#ifndef BUTIL_CONFIG_H
#ifndef BUTIL_CONFIG_H
#define BUTIL_CONFIG_H
#define BUTIL_CONFIG_H
#ifdef BRPC_WITH_GLOG
#undef BRPC_WITH_GLOG
#endif
#cmakedefine BRPC_WITH_GLOG @WITH_GLOG_VAL@
#cmakedefine BRPC_WITH_GLOG @WITH_GLOG_VAL@
#endif // BUTIL_CONFIG_H
#endif // BUTIL_CONFIG_H
src/brpc/builtin/vlog_service.cpp
View file @
4c400a16
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
// Authors: Ge,Jun (gejun@baidu.com)
// Authors: Ge,Jun (gejun@baidu.com)
#if !BRPC_WITH_GLOG
#if !BRPC_WITH_GLOG
#include "brpc/log.h"
#include "brpc/log.h"
#include "brpc/controller.h" // Controller
#include "brpc/controller.h" // Controller
...
...
src/brpc/builtin/vlog_service.h
View file @
4c400a16
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
#ifndef BRPC_VLOG_SERVICE_H
#ifndef BRPC_VLOG_SERVICE_H
#define BRPC_VLOG_SERVICE_H
#define BRPC_VLOG_SERVICE_H
#if !BRPC_WITH_GLOG
#if !BRPC_WITH_GLOG
#include <ostream>
#include <ostream>
#include "brpc/builtin_service.pb.h"
#include "brpc/builtin_service.pb.h"
namespace
brpc
{
namespace
brpc
{
class
VLogService
:
public
vlog
{
class
VLogService
:
public
vlog
{
...
...
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