diff --git a/cmake/generic.cmake b/cmake/generic.cmake index fb2222440ca59a17e51f49ab3729e17f014e5753..cae9524b2fe1417f7792cbfd959280206f473797 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -162,6 +162,7 @@ function(cc_library TARGET_NAME) endif() if (cc_library_DEPS) add_dependencies(${TARGET_NAME} ${cc_library_DEPS}) + target_link_libraries(${TARGET_NAME} ${cc_library_DEPS}) endif() else(cc_library_SRCS) if (cc_library_DEPS) @@ -211,6 +212,7 @@ function(nv_library TARGET_NAME) endif() if (nv_library_DEPS) add_dependencies(${TARGET_NAME} ${nv_library_DEPS}) + target_link_libraries(${TARGET_NAME} ${nv_library_DEPS}) endif() else(nv_library_SRCS) if (nv_library_DEPS) diff --git a/paddle/framework/CMakeLists.txt b/paddle/framework/CMakeLists.txt index 1ef5f26addc2c539525b3745927903481dacb3ef..42600277f66854f6e11c27a0a6b0a36736d14eda 100644 --- a/paddle/framework/CMakeLists.txt +++ b/paddle/framework/CMakeLists.txt @@ -7,7 +7,8 @@ cc_test(scope_test SRCS scope_test.cc) cc_test(enforce_test SRCS enforce_test.cc) proto_library(attr_type SRCS attr_type.proto) proto_library(op_proto SRCS op_proto.proto DEPS attr_type) + cc_test(op_proto_test SRCS op_proto_test.cc DEPS op_proto attr_type protobuf) proto_library(net_proto SRCS net_proto.proto) -cc_library(net SRCS net.cc DEPS net_proto attr_type op_proto) +cc_library(net SRCS net.cc DEPS net_proto attr_type op_proto) \ No newline at end of file