FindProtobuf output directory undocumented


I would like to export my protobuf-files into a separate directory. After reading through the FindProtobuf.cmake I found out, that there is an option PROTOC_OUT of generate_protobuf_cpp that does exactly that, but seems to be undocumented. As this option exists since at least v3.16 (that I use), I’m wondering why it is not documented? If it simply has been forgotten, I would try and change the documentation myself (and probably add functionality to create this folder if it doesn’t exist).

Thanks and best regards

I presume you are talking about PROTOC_OUT_DIR? It looks like it came in at 3.13 by copying upstream’s implementation. It seems that upstream has no documentation. Adding that locally sounds reasonable to me.

Since it has some lineage with upstream, checking that things there work as expected would be useful too (e.g., if the directory needs to be made).

Yes, exactly, that is the option I was referring to.
What do you mean by upstream? Google’s own cmake implementation?

Yes, upstream is Protobuf’s own repository. When I looked, it seems that upstream changed again, so maybe we’re left on a fork of the code at this point. If that’s the case, I think just adding docs in CMake is sufficient.