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
54025e4a
Unverified
Commit
54025e4a
authored
Aug 26, 2019
by
Ge Jun
Committed by
GitHub
Aug 26, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #904 from zyearn/refine_cmake_example
unify dynamic link option in make and cmake
parents
c90c58b7
1b90ea18
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
51 additions
and
51 deletions
+51
-51
getting_started.md
docs/cn/getting_started.md
+3
-3
CMakeLists.txt
example/asynchronous_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/auto_concurrency_limiter/CMakeLists.txt
+2
-2
CMakeLists.txt
example/backup_request_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/cancel_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/cascade_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/dynamic_partition_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/echo_c++_hulu_pbrpc/CMakeLists.txt
+2
-2
CMakeLists.txt
example/echo_c++_sofa_pbrpc/CMakeLists.txt
+2
-2
CMakeLists.txt
example/echo_c++_ubrpc_compack/CMakeLists.txt
+2
-2
CMakeLists.txt
example/grpc_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/http_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/memcache_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/multi_threaded_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/multi_threaded_echo_fns_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/multi_threaded_mcpack_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/nshead_extension_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/nshead_pb_extension_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/parallel_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/partition_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/redis_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/selective_echo_c++/CMakeLists.txt
+2
-2
CMakeLists.txt
example/session_data_and_thread_local/CMakeLists.txt
+2
-2
CMakeLists.txt
example/streaming_echo_c++/CMakeLists.txt
+2
-2
No files found.
docs/cn/getting_started.md
View file @
54025e4a
...
...
@@ -90,7 +90,7 @@ $ mkdir bld && cd bld && cmake .. && make
$
./echo_server &
$
./echo_client
```
Examples link brpc statically, if you need to link the shared version, use
`cmake -D
EXAMPLE_
LINK_SO=ON ..`
Examples link brpc statically, if you need to link the shared version, use
`cmake -DLINK_SO=ON ..`
**Run tests**
```
shell
...
...
@@ -180,7 +180,7 @@ $ mkdir bld && cd bld && cmake .. && make
$
./echo_server &
$
./echo_client
```
Examples link brpc statically, if you need to link the shared version, use
`cmake -D
EXAMPLE_
LINK_SO=ON ..`
Examples link brpc statically, if you need to link the shared version, use
`cmake -DLINK_SO=ON ..`
**Run tests**
```
shell
...
...
@@ -318,7 +318,7 @@ $ mkdir bld && cd bld && cmake .. && make
$
./echo_server &
$
./echo_client
```
Examples link brpc statically, if you need to link the shared version, use
`cmake -D
EXAMPLE_
LINK_SO=ON ..`
Examples link brpc statically, if you need to link the shared version, use
`cmake -DLINK_SO=ON ..`
**Run tests**
```
shell
...
...
example/asynchronous_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
asynchronous_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/auto_concurrency_limiter/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
asynchronous_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
CMAKE_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -17,7 +17,7 @@ protobuf_generate_cpp(PROTO_SRC PROTO_HEADER cl_test.proto)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/backup_request_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
backup_request_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/cancel_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
cancel_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/cascade_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
cascade_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -27,7 +27,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/dynamic_partition_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
dynamic_partition_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/echo_c++_hulu_pbrpc/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
echo_c++_hulu_pbrpc C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/echo_c++_sofa_pbrpc/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
echo_c++_sofa_pbrpc C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/echo_c++_ubrpc_compack/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
echo_c++_ubrpc_compack C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/grpc_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
grpc_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
CMAKE_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -21,7 +21,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/http_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
http_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/memcache_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
memcache_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/multi_threaded_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
multi_threaded_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/multi_threaded_echo_fns_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
multi_threaded_echo_fns_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/multi_threaded_mcpack_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
multi_threaded_mcpack_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/nshead_extension_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
nshead_extension_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/nshead_pb_extension_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
nshead_pb_extension_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/parallel_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
parallel_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/partition_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
partition_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/redis_c++/CMakeLists.txt
View file @
54025e4a
...
...
@@ -9,7 +9,7 @@ project(redis_c++ C CXX)
# sudo yum install readline-devel
# sudo yum install ncurses-devel
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -33,7 +33,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/selective_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
selective_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/session_data_and_thread_local/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
session_data_and_thread_local C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -32,7 +32,7 @@ find_library(GPERFTOOLS_LIBRARIES NAMES tcmalloc_and_profiler)
include_directories
(
${
GPERFTOOLS_INCLUDE_DIR
}
)
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
example/streaming_echo_c++/CMakeLists.txt
View file @
54025e4a
cmake_minimum_required
(
VERSION 2.8.10
)
project
(
streaming_echo_c++ C CXX
)
option
(
EXAMPLE_
LINK_SO
"Whether examples are linked dynamically"
OFF
)
option
(
LINK_SO
"Whether examples are linked dynamically"
OFF
)
execute_process
(
COMMAND bash -c
"find
${
PROJECT_SOURCE_DIR
}
/../.. -type d -regex
\"
.*output/include$
\"
| head -n1 | xargs dirname | tr -d '
\n
'"
...
...
@@ -28,7 +28,7 @@ if (NOT THRIFTNB_LIB)
endif
()
find_path
(
BRPC_INCLUDE_PATH NAMES brpc/server.h
)
if
(
EXAMPLE_
LINK_SO
)
if
(
LINK_SO
)
find_library
(
BRPC_LIB NAMES brpc
)
else
()
find_library
(
BRPC_LIB NAMES libbrpc.a brpc
)
...
...
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