|
|
|
@ -332,13 +332,13 @@ function(go_test TARGET_NAME)
|
|
|
|
|
add_test(${TARGET_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME})
|
|
|
|
|
endfunction(go_test)
|
|
|
|
|
|
|
|
|
|
function(pb_cc_library TARGET_NAME)
|
|
|
|
|
function(proto_library TARGET_NAME)
|
|
|
|
|
set(oneValueArgs "")
|
|
|
|
|
set(multiValueArgs SRCS)
|
|
|
|
|
cmake_parse_arguments(pb_cc_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
|
cmake_parse_arguments(proto_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
|
set(proto_srcs)
|
|
|
|
|
set(proto_hdrs)
|
|
|
|
|
protobuf_generate_cpp(proto_srcs proto_hdrs ${pb_cc_library_SRCS})
|
|
|
|
|
protobuf_generate_cpp(proto_srcs proto_hdrs ${proto_library_SRCS})
|
|
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
cc_library(${TARGET_NAME} SRCS ${proto_srcs})
|
|
|
|
|
endfunction()
|
|
|
|
|