generic.cmake rules cannot depend on protobuf
Created by: wangkuiyi
As reported by @reyoung , given that we have cmake/external/protobuf.cmake
, build rules defined in cmake/generic.cmake
, e.g., cc_library
, should be able to have parameters like DEPS protobuf
. But if we write such build rules, CMake would complain that target protobuf doesn't exist:
CMake Error at cmake/generic.cmake:177 (add_dependencies):
The dependency target "protobuf" of target "example_proto" does not exist.
Call Stack (most recent call first):
cmake/generic.cmake:200 (cc_library)
paddle/framework/CMakeLists.txt:6 (proto_library)