Commit d9ea91cb authored by zhujiashun's avatar zhujiashun

remove unnecessary code in example

parent 8adbabc6
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(asynchronous_echo_client client.cpp ${PROTO_SRC})
add_executable(asynchronous_echo_server server.cpp ${PROTO_SRC})
if(EXAMPLE_LINK_SO)
target_link_libraries(asynchronous_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(asynchronous_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(asynchronous_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(asynchronous_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(asynchronous_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(asynchronous_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(backup_request_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(backup_request_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(backup_request_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(backup_request_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(backup_request_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(backup_request_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(backup_request_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(backup_request_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(cancel_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(cancel_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(cancel_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cancel_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(cancel_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cancel_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(cancel_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cancel_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(cascade_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(cascade_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(cascade_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cascade_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(cascade_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cascade_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(cascade_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(cascade_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(dynamic_partition_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(dynamic_partition_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(dynamic_partition_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(dynamic_partition_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(dynamic_partition_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(dynamic_partition_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(dynamic_partition_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(dynamic_partition_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
dl
)
if(EXAMPLE_LINK_SO)
target_link_libraries(echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(echo_hulu_pbrpc_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(echo_hulu_pbrpc_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(echo_hulu_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_hulu_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(echo_hulu_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_hulu_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(echo_hulu_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_hulu_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(echo_sofa_pbrpc_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(echo_sofa_pbrpc_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(echo_sofa_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_sofa_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(echo_sofa_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_sofa_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(echo_sofa_pbrpc_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_sofa_pbrpc_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -84,11 +84,5 @@ execute_process(
add_executable(echo_ubrpc_compack_client client.cpp ${CMAKE_CURRENT_BINARY_DIR}/echo.pb.cc)
add_executable(echo_ubrpc_compack_server server.cpp ${CMAKE_CURRENT_BINARY_DIR}/echo.pb.cc)
if(EXAMPLE_LINK_SO)
target_link_libraries(echo_ubrpc_compack_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_ubrpc_compack_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(echo_ubrpc_compack_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_ubrpc_compack_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(echo_ubrpc_compack_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(echo_ubrpc_compack_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -92,12 +92,6 @@ add_executable(http_client http_client.cpp)
add_executable(http_server http_server.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(benchmark_http benchmark_http.cpp)
if(EXAMPLE_LINK_SO)
target_link_libraries(http_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(http_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(benchmark_http ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(http_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(http_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(benchmark_http ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(http_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(http_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(benchmark_http ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -78,8 +78,4 @@ set(DYNAMIC_LIB
add_executable(memcache_client client.cpp)
if(EXAMPLE_LINK_SO)
target_link_libraries(memcache_client ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(memcache_client ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(memcache_client ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(multi_threaded_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(multi_threaded_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(multi_threaded_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(multi_threaded_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(multi_threaded_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(multi_threaded_echo_fns_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(multi_threaded_echo_fns_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(multi_threaded_echo_fns_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_fns_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(multi_threaded_echo_fns_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_fns_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(multi_threaded_echo_fns_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_echo_fns_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -89,10 +89,5 @@ execute_process(
add_executable(multi_threaded_mcpack_client client.cpp ${CMAKE_CURRENT_BINARY_DIR}/echo.pb.cc)
add_executable(multi_threaded_mcpack_server server.cpp ${CMAKE_CURRENT_BINARY_DIR}/echo.pb.cc)
if(EXAMPLE_LINK_SO)
target_link_libraries(multi_threaded_mcpack_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_mcpack_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(multi_threaded_mcpack_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_mcpack_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(multi_threaded_mcpack_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(multi_threaded_mcpack_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(nshead_extension_client client.cpp)
add_executable(nshead_extension_server server.cpp)
if(EXAMPLE_LINK_SO)
target_link_libraries(nshead_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(nshead_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(nshead_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(nshead_pb_extension_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(nshead_pb_extension_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(nshead_pb_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_pb_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(nshead_pb_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_pb_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(nshead_pb_extension_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(nshead_pb_extension_server ${BRPC_LIB} ${DYNAMIC_LIB})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(parallel_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(parallel_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(parallel_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(parallel_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(parallel_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(parallel_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(parallel_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(parallel_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if (EXAMPLE_LINK_SO)
target_link_libraries(client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -85,11 +85,5 @@ add_executable(redis_cli redis_cli.cpp)
add_executable(redis_press redis_press.cpp)
set(AUX_LIB readline ncurses)
if(EXAMPLE_LINK_SO)
target_link_libraries(redis_cli ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
target_link_libraries(redis_press ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
else()
target_link_libraries(redis_cli ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
target_link_libraries(redis_press ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
endif()
target_link_libraries(redis_cli ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
target_link_libraries(redis_press ${BRPC_LIB} ${DYNAMIC_LIB} ${AUX_LIB})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(selective_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(selective_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(selective_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(selective_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(selective_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(selective_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(selective_echo_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(selective_echo_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -84,10 +84,5 @@ set(DYNAMIC_LIB
add_executable(session_data_and_thread_local_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(session_data_and_thread_local_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(session_data_and_thread_local_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(session_data_and_thread_local_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
else()
target_link_libraries(session_data_and_thread_local_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(session_data_and_thread_local_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
endif()
target_link_libraries(session_data_and_thread_local_client ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
target_link_libraries(session_data_and_thread_local_server ${BRPC_LIB} ${DYNAMIC_LIB} ${GPERFTOOLS_LIBRARIES})
......@@ -79,10 +79,5 @@ set(DYNAMIC_LIB
add_executable(streaming_echo_client client.cpp ${PROTO_SRC} ${PROTO_HEADER})
add_executable(streaming_echo_server server.cpp ${PROTO_SRC} ${PROTO_HEADER})
if(EXAMPLE_LINK_SO)
target_link_libraries(streaming_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(streaming_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
else()
target_link_libraries(streaming_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(streaming_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
endif()
target_link_libraries(streaming_echo_client ${BRPC_LIB} ${DYNAMIC_LIB})
target_link_libraries(streaming_echo_server ${BRPC_LIB} ${DYNAMIC_LIB})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment