Rename pb_cc_library -> proto_library

gangliao-patch-1
Yu Yang 8 years ago
parent 32d6587242
commit b88ca542ba

@ -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()

@ -1,5 +1,5 @@
file(GLOB proto_filenames . *.proto)
pb_cc_library(paddle_proto SRCS ${proto_filenames})
proto_library(paddle_proto SRCS ${proto_filenames})
set(PROTO_GEN)
set(PROTO_GEN_PY)

Loading…
Cancel
Save