[cmake-developers] How to handle dependencies of protobuf files ?

Brad King brad.king at kitware.com
Wed May 30 09:12:05 EDT 2018


On 05/29/2018 04:00 PM, Alexander Neundorf wrote:
>> In order to handle implicit dependencies like that implied by
>>
>>     import "MyBase.proto";
>>
>> then they would somehow need to be extracted from source content.
>
> Would that have to be implemented similar to the C dependency scanning ?

Yes, but even better would be if we can ask protoc to print the dependencies
out for us so we don't have to parse the sources ourselves.

> so the cheap solution would be to add an argument to PROTOBUF_GENERATE_CPP() 
> to list proto-files these proto-files depend on

Yes, that would be a good intermediate solution.

-Brad


More information about the cmake-developers mailing list