apache /
kudu /
5dd46866138e0d3b34d6cc11f3b578764563fbbc KUDU-924: protoc dependents must serialize on intermediary custom targets
The cmake documentation for add_custom_command() says that two rules that
depend on the same command output may conflict; in practice, this means that
the custom command may run more than once. The workaround is to add a custom
target between the command output and its dependents. I believe we're
vulnerable to this with PROTOBUF_GENERATE_CPP() and KRPC_GENERATE().
To address this, I've modified those functions to produce custom targets,
one for each .proto file. The functions "return" the target list back to the
caller, and the caller is responsible for adding them as dependencies to the
consuming target. In our case, that's within ADD_EXPORTED_LIBRARY(), which
is where the two consumers are.
Change-Id: Iea1de37436ce7efdf22cd87e2e773569e326085c
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/7324
Tested-by: jenkins
Reviewed-by: Todd Lipcon <todd@cloudera.com>
13 files changed