Commit 440945a0 authored by zhujiashun's avatar zhujiashun

make tools/ support cmake

parent b958dfad
......@@ -309,6 +309,7 @@ add_subdirectory(src)
if(BUILD_UNIT_TESTS)
add_subdirectory(test)
endif()
add_subdirectory(tools)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/idl_options.pb.h
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/output/include)
......
set(CMAKE_CPP_FLAGS "-DGFLAGS_NS=${GFLAGS_NS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CPP_FLAGS} -DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer")
use_cxx11()
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/output/bin)
add_subdirectory(parallel_http)
add_subdirectory(rpc_press)
add_subdirectory(rpc_replay)
add_subdirectory(rpc_view)
add_subdirectory(trackme_server)
add_executable(parallel_http parallel_http.cpp)
target_link_libraries(parallel_http brpc_static ${DYNAMIC_LIB})
file(GLOB SOURCES "${CMAKE_SOURCE_DIR}/tools/rpc_press/*.cpp")
add_executable(rpc_press ${SOURCES})
target_link_libraries(rpc_press brpc_static ${DYNAMIC_LIB})
file(GLOB SOURCES "${CMAKE_SOURCE_DIR}/tools/rpc_replay/*.cpp")
add_executable(rpc_replay ${SOURCES})
target_link_libraries(rpc_replay brpc_static ${DYNAMIC_LIB})
include(FindProtobuf)
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})
add_executable(trackme_server trackme_server.cpp)
target_link_libraries(trackme_server brpc_static ${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