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
4adb6894
Commit
4adb6894
authored
Aug 06, 2019
by
Yiming Jing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link MesaLink in CMake if enabled
parent
cec08d43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
CMakeLists.txt
CMakeLists.txt
+14
-0
build_in_travis_ci.sh
build_in_travis_ci.sh
+1
-1
No files found.
CMakeLists.txt
View file @
4adb6894
...
...
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.8.10)
project
(
brpc C CXX
)
option
(
WITH_GLOG
"With glog"
OFF
)
option
(
WITH_MESALINK
"With MesaLink"
OFF
)
option
(
DEBUG
"Print debug logs"
OFF
)
option
(
WITH_DEBUG_SYMBOLS
"With debug symbols"
ON
)
option
(
WITH_THRIFT
"With thrift framed protocol supported"
OFF
)
...
...
@@ -88,6 +89,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
WITH_MESALINK
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DUSE_MESALINK"
)
endif
()
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"
)
...
...
@@ -137,6 +141,15 @@ if(WITH_GLOG)
include_directories
(
${
GLOG_INCLUDE_PATH
}
)
endif
()
if
(
WITH_MESALINK
)
find_path
(
MESALINK_INCLUDE_PATH NAMES mesalink/openssl/ssl.h
)
find_library
(
MESALINK_LIB NAMES mesalink
)
if
((
NOT MESALINK_INCLUDE_PATH
)
OR
(
NOT MESALINK_LIB
))
message
(
FATAL_ERROR
"Fail to find MesaLink"
)
endif
()
include_directories
(
${
MESALINK_INCLUDE_PATH
}
)
endif
()
find_library
(
PROTOC_LIB NAMES protoc
)
if
(
NOT PROTOC_LIB
)
message
(
FATAL_ERROR
"Fail to find protoc lib"
)
...
...
@@ -167,6 +180,7 @@ set(DYNAMIC_LIB
${
THRIFTNB_LIB
}
${
OPENSSL_LIBRARIES
}
${
OPENSSL_CRYPTO_LIBRARY
}
${
MESALINK_LIB
}
dl
z
)
set
(
BRPC_PRIVATE_LIBS
"-lgflags -lprotobuf -lleveldb -lprotoc -lssl -lcrypto -ldl -lz"
)
...
...
build_in_travis_ci.sh
View file @
4adb6894
...
...
@@ -40,7 +40,7 @@ if [ "$PURPOSE" = "compile" ]; then
elif
[
"
$PURPOSE
"
=
"unittest"
]
;
then
init_make_config
&&
cd test
&&
make
-j4
&&
sh ./run_tests.sh
elif
[
"
$PURPOSE
"
=
"compile-with-cmake"
]
;
then
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake ..
&&
make
-j4
rm
-rf
bld
&&
mkdir
bld
&&
cd
bld
&&
cmake
-DWITH_MESALINK
=
"
$USE_MESALINK
"
..
&&
make
-j4
elif
[
"
$PURPOSE
"
=
"compile-with-bazel"
]
;
then
bazel build
-j
12
-c
opt
--copt
-DHAVE_ZLIB
=
1 //...
else
...
...
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