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
32719a43
Commit
32719a43
authored
Jan 25, 2018
by
Zhangyi Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renam libbrpc_static.a to libbrpc.a
parent
075b485a
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
291 additions
and
92 deletions
+291
-92
CMakeLists.txt
example/asynchronous_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/backup_request_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/cancel_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/cascade_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/dynamic_partition_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/echo_c++/CMakeLists.txt
+1
-1
Makefile
example/echo_c++/Makefile
+254
-58
CMakeLists.txt
example/echo_c++_hulu_pbrpc/CMakeLists.txt
+1
-1
CMakeLists.txt
example/echo_c++_sofa_pbrpc/CMakeLists.txt
+1
-1
CMakeLists.txt
example/echo_c++_ubrpc_compack/CMakeLists.txt
+1
-1
CMakeLists.txt
example/http_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/memcache_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/multi_threaded_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/multi_threaded_echo_fns_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/multi_threaded_mcpack_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/nshead_extension_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/nshead_pb_extension_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/parallel_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/partition_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/redis_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/selective_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
example/session_data_and_thread_local/CMakeLists.txt
+1
-1
CMakeLists.txt
example/streaming_echo_c++/CMakeLists.txt
+1
-1
CMakeLists.txt
src/CMakeLists.txt
+10
-7
CMakeLists.txt
tools/parallel_http/CMakeLists.txt
+1
-1
CMakeLists.txt
tools/rpc_press/CMakeLists.txt
+1
-1
CMakeLists.txt
tools/rpc_replay/CMakeLists.txt
+1
-1
CMakeLists.txt
tools/rpc_view/CMakeLists.txt
+1
-1
CMakeLists.txt
tools/trackme_server/CMakeLists.txt
+1
-1
No files found.
example/asynchronous_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/backup_request_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/cancel_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/cascade_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/dynamic_partition_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/echo_c++/Makefile
View file @
32719a43
BRPC_PATH
=
../../
include
$(BRPC_PATH)/config.mk
# Notes on the flags:
# 1. Added -fno-omit-frame-pointer: perf/tcmalloc-profiler use frame pointers by default
# 2. Added -D__const__= : Avoid over-optimizations of TLS variables by GCC>=4.8
CXXFLAGS
+=
$(CPPFLAGS)
-std
=
c++0x
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Wno-unused-parameter
-fPIC
-fno-omit-frame-pointer
HDRS
+=
$(BRPC_PATH)
/output/include
LIBS
+=
$(BRPC_PATH)
/output/lib
HDRPATHS
=
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
$
(
addprefix
-L
,
$(LIBS)
)
COMMA
=
,
SOPATHS
=
$
(
addprefix
-Wl
$(COMMA)
-rpath
=
,
$(LIBS)
)
STATIC_LINKINGS
+=
-lbrpc
CLIENT_SOURCES
=
client.cpp
SERVER_SOURCES
=
server.cpp
PROTOS
=
$
(
wildcard
*
.proto
)
PROTO_OBJS
=
$
(
PROTOS:.proto
=
.pb.o
)
PROTO_GENS
=
$
(
PROTOS:.proto
=
.pb.h
)
$
(
PROTOS:.proto
=
.pb.cc
)
CLIENT_OBJS
=
$
(
addsuffix .o,
$
(
basename
$(CLIENT_SOURCES)
))
SERVER_OBJS
=
$
(
addsuffix .o,
$
(
basename
$(SERVER_SOURCES)
))
.PHONY
:
all
all
:
echo_client echo_server
.PHONY
:
clean
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Default target executed when no arguments are given to make.
default_target
:
all
.PHONY
:
default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL
:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES
:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES
=
.SUFFIXES
:
.hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT
:
# A target that is always out of date.
cmake_force
:
.PHONY
:
cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL
=
/bin/sh
# The CMake executable.
CMAKE_COMMAND
=
/usr/bin/cmake
# The command to remove a file.
RM
=
/usr/bin/cmake
-E
remove
-f
# Escaping for special characters.
EQUALS
=
=
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR
=
/home/chen/Code/brpc/example/echo_c++
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR
=
/home/chen/Code/brpc/example/echo_c++
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache
:
@
$(CMAKE_COMMAND)
-E
cmake_echo_color
--switch
=
$(COLOR)
--cyan
"No interactive CMake dialog available..."
/usr/bin/cmake
-E
echo
No
\
interactive
\
CMake
\
dialog
\
available.
.PHONY
:
edit_cache
# Special rule for the target edit_cache
edit_cache/fast
:
edit_cache
.PHONY
:
edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache
:
@
$(CMAKE_COMMAND)
-E
cmake_echo_color
--switch
=
$(COLOR)
--cyan
"Running CMake to regenerate build system..."
/usr/bin/cmake
-H
$(CMAKE_SOURCE_DIR)
-B
$(CMAKE_BINARY_DIR)
.PHONY
:
rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast
:
rebuild_cache
.PHONY
:
rebuild_cache/fast
# The main all target
all
:
cmake_check_build_system
$(CMAKE_COMMAND)
-E
cmake_progress_start /home/chen/Code/brpc/example/echo_c++/CMakeFiles /home/chen/Code/brpc/example/echo_c++/CMakeFiles/progress.marks
$(MAKE)
-f
CMakeFiles/Makefile2 all
$(CMAKE_COMMAND)
-E
cmake_progress_start /home/chen/Code/brpc/example/echo_c++/CMakeFiles 0
.PHONY
:
all
# The main clean target
clean
:
@
echo
"Cleaning"
@
rm
-rf
echo_client echo_server
$(PROTO_GENS)
$(PROTO_OBJS)
$(CLIENT_OBJS)
$(SERVER_OBJS)
echo_client
:
$(PROTO_OBJS) $(CLIENT_OBJS)
@
echo
"Linking
$@
"
ifneq
(
"$(LINK_SO)"
,
""
)
@$(CXX)
$(LIBPATHS)
$(SOPATHS)
-Xlinker
"-("
$^
-Xlinker
"-)"
$(STATIC_LINKINGS)
$(DYNAMIC_LINKINGS)
-o
$@
else
@$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl,-Bstatic
$(STATIC_LINKINGS)
-Wl,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
endif
echo_server
:
$(PROTO_OBJS) $(SERVER_OBJS)
@
echo
"Linking
$@
"
ifneq
(
"$(LINK_SO)"
,
""
)
@$(CXX)
$(LIBPATHS)
$(SOPATHS)
-Xlinker
"-("
$^
-Xlinker
"-)"
$(STATIC_LINKINGS)
$(DYNAMIC_LINKINGS)
-o
$@
else
@$(CXX)
$(LIBPATHS)
-Xlinker
"-("
$^
-Wl,-Bstatic
$(STATIC_LINKINGS)
-Wl,-Bdynamic
-Xlinker
"-)"
$(DYNAMIC_LINKINGS)
-o
$@
endif
%.pb.cc %.pb.h
:
%.proto
@
echo
"Generating
$@
"
@
$(PROTOC)
--cpp_out
=
.
--proto_path
=
.
$(PROTOC_EXTRA_ARGS)
$<
%.o
:
%.cpp
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(HDRPATHS)
$(CXXFLAGS)
$<
-o
$@
%.o
:
%.cc
@
echo
"Compiling
$@
"
@
$(CXX)
-c
$(HDRPATHS)
$(CXXFLAGS)
$<
-o
$@
$(MAKE)
-f
CMakeFiles/Makefile2 clean
.PHONY
:
clean
# The main clean target
clean/fast
:
clean
.PHONY
:
clean/fast
# Prepare targets for installation.
preinstall
:
all
$(MAKE)
-f
CMakeFiles/Makefile2 preinstall
.PHONY
:
preinstall
# Prepare targets for installation.
preinstall/fast
:
$(MAKE)
-f
CMakeFiles/Makefile2 preinstall
.PHONY
:
preinstall/fast
# clear depends
depend
:
$(CMAKE_COMMAND)
-H
$(CMAKE_SOURCE_DIR)
-B
$(CMAKE_BINARY_DIR)
--check-build-system
CMakeFiles/Makefile.cmake 1
.PHONY
:
depend
#=============================================================================
# Target rules for targets named echo_server
# Build rule for target.
echo_server
:
cmake_check_build_system
$(MAKE)
-f
CMakeFiles/Makefile2 echo_server
.PHONY
:
echo_server
# fast build rule for target.
echo_server/fast
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/build
.PHONY
:
echo_server/fast
#=============================================================================
# Target rules for targets named echo_client
# Build rule for target.
echo_client
:
cmake_check_build_system
$(MAKE)
-f
CMakeFiles/Makefile2 echo_client
.PHONY
:
echo_client
# fast build rule for target.
echo_client/fast
:
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/build
.PHONY
:
echo_client/fast
client.o
:
client.cpp.o
.PHONY
:
client.o
# target to build an object file
client.cpp.o
:
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/client.cpp.o
.PHONY
:
client.cpp.o
client.i
:
client.cpp.i
.PHONY
:
client.i
# target to preprocess a source file
client.cpp.i
:
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/client.cpp.i
.PHONY
:
client.cpp.i
client.s
:
client.cpp.s
.PHONY
:
client.s
# target to generate assembly for a file
client.cpp.s
:
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/client.cpp.s
.PHONY
:
client.cpp.s
echo.pb.o
:
echo.pb.cc.o
.PHONY
:
echo.pb.o
# target to build an object file
echo.pb.cc.o
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/echo.pb.cc.o
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/echo.pb.cc.o
.PHONY
:
echo.pb.cc.o
echo.pb.i
:
echo.pb.cc.i
.PHONY
:
echo.pb.i
# target to preprocess a source file
echo.pb.cc.i
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/echo.pb.cc.i
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/echo.pb.cc.i
.PHONY
:
echo.pb.cc.i
echo.pb.s
:
echo.pb.cc.s
.PHONY
:
echo.pb.s
# target to generate assembly for a file
echo.pb.cc.s
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/echo.pb.cc.s
$(MAKE)
-f
CMakeFiles/echo_client.dir/build.make CMakeFiles/echo_client.dir/echo.pb.cc.s
.PHONY
:
echo.pb.cc.s
server.o
:
server.cpp.o
.PHONY
:
server.o
# target to build an object file
server.cpp.o
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/server.cpp.o
.PHONY
:
server.cpp.o
server.i
:
server.cpp.i
.PHONY
:
server.i
# target to preprocess a source file
server.cpp.i
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/server.cpp.i
.PHONY
:
server.cpp.i
server.s
:
server.cpp.s
.PHONY
:
server.s
# target to generate assembly for a file
server.cpp.s
:
$(MAKE)
-f
CMakeFiles/echo_server.dir/build.make CMakeFiles/echo_server.dir/server.cpp.s
.PHONY
:
server.cpp.s
# Help Target
help
:
@
echo
"The following are some of the valid targets for this Makefile:"
@
echo
"... all (the default if no target is provided)"
@
echo
"... clean"
@
echo
"... depend"
@
echo
"... edit_cache"
@
echo
"... rebuild_cache"
@
echo
"... echo_server"
@
echo
"... echo_client"
@
echo
"... client.o"
@
echo
"... client.i"
@
echo
"... client.s"
@
echo
"... echo.pb.o"
@
echo
"... echo.pb.i"
@
echo
"... echo.pb.s"
@
echo
"... server.o"
@
echo
"... server.i"
@
echo
"... server.s"
.PHONY
:
help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system
:
$(CMAKE_COMMAND)
-H
$(CMAKE_SOURCE_DIR)
-B
$(CMAKE_BINARY_DIR)
--check-build-system
CMakeFiles/Makefile.cmake 0
.PHONY
:
cmake_check_build_system
example/echo_c++_hulu_pbrpc/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/echo_c++_sofa_pbrpc/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/echo_c++_ubrpc_compack/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/http_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -31,7 +31,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/memcache_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/multi_threaded_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/multi_threaded_echo_fns_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/multi_threaded_mcpack_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/nshead_extension_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/nshead_pb_extension_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/parallel_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/partition_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/redis_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -25,7 +25,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/selective_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/session_data_and_thread_local/CMakeLists.txt
View file @
32719a43
...
...
@@ -24,7 +24,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
example/streaming_echo_c++/CMakeLists.txt
View file @
32719a43
...
...
@@ -20,7 +20,7 @@ find_path(BRPC_INCLUDE_PATH NAMES brpc/server.h)
if
(
EXAMPLE_LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc
_static
.a brpc
)
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
endif
()
if
((
NOT BRPC_INCLUDE_PATH
)
OR
(
NOT BRPC_LIB
))
message
(
FATAL_ERROR
"Fail to find brpc"
)
...
...
src/CMakeLists.txt
View file @
32719a43
...
...
@@ -16,15 +16,18 @@ add_library(OBJ_LIB OBJECT ${SOURCES})
set_property
(
TARGET
${
OBJ_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
set_property
(
TARGET
${
BUTIL_LIB
}
PROPERTY POSITION_INDEPENDENT_CODE 1
)
add_library
(
brpc SHARED $<TARGET_OBJECTS:BUTIL_LIB> $<TARGET_OBJECTS:OBJ_LIB>
)
add_library
(
brpc
_
static STATIC $<TARGET_OBJECTS:BUTIL_LIB> $<TARGET_OBJECTS:OBJ_LIB>
)
add_library
(
brpc
-shared
SHARED $<TARGET_OBJECTS:BUTIL_LIB> $<TARGET_OBJECTS:OBJ_LIB>
)
add_library
(
brpc
-
static STATIC $<TARGET_OBJECTS:BUTIL_LIB> $<TARGET_OBJECTS:OBJ_LIB>
)
target_link_libraries
(
brpc
${
DYNAMIC_LIB
}
)
target_link_libraries
(
brpc
-shared
${
DYNAMIC_LIB
}
)
if
(
WITH_GLOG
)
target_link_libraries
(
brpc
${
GLOG_LIB
}
)
target_link_libraries
(
brpc
-shared
${
GLOG_LIB
}
)
endif
()
SET_TARGET_PROPERTIES
(
brpc-static PROPERTIES OUTPUT_NAME brpc CLEAN_DIRECT_OUTPUT 1
)
SET_TARGET_PROPERTIES
(
brpc-shared PROPERTIES OUTPUT_NAME brpc CLEAN_DIRECT_OUTPUT 1
)
# for protoc-gen-mcpack
set
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_BINARY_DIR
}
/output/bin
)
...
...
@@ -32,7 +35,7 @@ set(protoc_gen_mcpack_SOURCES
${
CMAKE_SOURCE_DIR
}
/src/mcpack2pb/generator.cpp
)
add_executable
(
protoc-gen-mcpack
${
protoc_gen_mcpack_SOURCES
}
)
target_link_libraries
(
protoc-gen-mcpack brpc
)
target_link_libraries
(
protoc-gen-mcpack brpc
-shared
)
get_property
(
LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS
)
if
(
"
${
LIB64
}
"
STREQUAL
"TRUE"
)
...
...
@@ -43,13 +46,13 @@ endif()
#install directory
# cmake -DCMAKE_INSTALL_PREFIX=/usr
install
(
TARGETS brpc
install
(
TARGETS brpc
-shared
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
${
LIBSUFFIX
}
ARCHIVE DESTINATION lib
${
LIBSUFFIX
}
)
install
(
TARGETS brpc
_
static
install
(
TARGETS brpc
-
static
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
${
LIBSUFFIX
}
ARCHIVE DESTINATION lib
${
LIBSUFFIX
}
...
...
tools/parallel_http/CMakeLists.txt
View file @
32719a43
add_executable
(
parallel_http parallel_http.cpp
)
target_link_libraries
(
parallel_http brpc
_
static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
parallel_http brpc
-
static
${
DYNAMIC_LIB
}
)
tools/rpc_press/CMakeLists.txt
View file @
32719a43
file
(
GLOB SOURCES
"
${
CMAKE_SOURCE_DIR
}
/tools/rpc_press/*.cpp"
)
add_executable
(
rpc_press
${
SOURCES
}
)
target_link_libraries
(
rpc_press brpc
_
static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
rpc_press brpc
-
static
${
DYNAMIC_LIB
}
)
tools/rpc_replay/CMakeLists.txt
View file @
32719a43
file
(
GLOB SOURCES
"
${
CMAKE_SOURCE_DIR
}
/tools/rpc_replay/*.cpp"
)
add_executable
(
rpc_replay
${
SOURCES
}
)
target_link_libraries
(
rpc_replay brpc
_
static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
rpc_replay brpc
-
static
${
DYNAMIC_LIB
}
)
tools/rpc_view/CMakeLists.txt
View file @
32719a43
...
...
@@ -3,4 +3,4 @@ protobuf_generate_cpp(PROTO_SRC PROTO_HEADER view.proto)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_executable
(
rpc_view rpc_view.cpp
${
PROTO_SRC
}
)
target_link_libraries
(
rpc_view brpc
_
static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
rpc_view brpc
-
static
${
DYNAMIC_LIB
}
)
tools/trackme_server/CMakeLists.txt
View file @
32719a43
add_executable
(
trackme_server trackme_server.cpp
)
target_link_libraries
(
trackme_server brpc
_
static
${
DYNAMIC_LIB
}
)
target_link_libraries
(
trackme_server brpc
-
static
${
DYNAMIC_LIB
}
)
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