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
303cd576
Unverified
Commit
303cd576
authored
Jan 14, 2019
by
Ge Jun
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #621 from zyearn/fix_cmake_glog
update cmake docs after fixing pull/620
parents
4c400a16
9b5c24f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
CMakeLists.txt
CMakeLists.txt
+5
-4
brpc_naming_service_unittest.cpp
test/brpc_naming_service_unittest.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
303cd576
...
...
@@ -22,15 +22,16 @@ else()
message
(
WARNING
"You are using an unsupported compiler! Compilation has only been tested with Clang and GCC."
)
endif
()
option
(
BRPC_
WITH_GLOG
"With glog"
OFF
)
option
(
WITH_GLOG
"With glog"
OFF
)
option
(
DEBUG
"Print debug logs"
OFF
)
option
(
WITH_DEBUG_SYMBOLS
"With debug symbols"
ON
)
option
(
WITH_THRIFT
"With thrift framed protocol supported"
OFF
)
option
(
BUILD_UNIT_TESTS
"Whether to build unit tests"
OFF
)
set
(
WITH_GLOG_VAL
"0"
)
if
(
BRPC_
WITH_GLOG
)
if
(
WITH_GLOG
)
set
(
WITH_GLOG_VAL
"1"
)
set
(
BRPC_WITH_GLOG 1
)
endif
()
if
(
WITH_DEBUG_SYMBOLS
)
...
...
@@ -121,7 +122,7 @@ if ((NOT LEVELDB_INCLUDE_PATH) OR (NOT LEVELDB_LIB))
message
(
FATAL_ERROR
"Fail to find leveldb"
)
endif
()
if
(
BRPC_
WITH_GLOG
)
if
(
WITH_GLOG
)
find_path
(
GLOG_INCLUDE_PATH NAMES glog/logging.h
)
find_library
(
GLOG_LIB NAMES glog
)
if
((
NOT GLOG_INCLUDE_PATH
)
OR
(
NOT GLOG_LIB
))
...
...
@@ -165,7 +166,7 @@ set(DYNAMIC_LIB
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz"
)
if
(
BRPC_
WITH_GLOG
)
if
(
WITH_GLOG
)
set
(
DYNAMIC_LIB
${
DYNAMIC_LIB
}
${
GLOG_LIB
}
)
set
(
BRPC_PRIVATE_LIBS
"
${
BRPC_PRIVATE_LIBS
}
-lglog"
)
endif
()
...
...
test/brpc_naming_service_unittest.cpp
View file @
303cd576
...
...
@@ -645,7 +645,7 @@ TEST(NamingServiceTest, discovery_sanity) {
// svc.RenewCount() be one.
ASSERT_EQ
(
0
,
dc
.
Register
(
dparam
));
ASSERT_EQ
(
0
,
dc
.
Register
(
dparam
));
bthread_usleep
(
100000
0
);
bthread_usleep
(
100000
);
}
ASSERT_EQ
(
svc
.
RenewCount
(),
1
);
ASSERT_EQ
(
svc
.
CancelCount
(),
1
);
...
...
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