<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le mer. 30 mai 2018 à 15:12, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 05/29/2018 04:00 PM, Alexander Neundorf wrote:<br>
>> In order to handle implicit dependencies like that implied by<br>
>><br>
>>     import "MyBase.proto";<br>
>><br>
>> then they would somehow need to be extracted from source content.<br>
><br>
> Would that have to be implemented similar to the C dependency scanning ?<br>
<br>
Yes, but even better would be if we can ask protoc to print the dependencies<br>
out for us so we don't have to parse the sources ourselves.<br></blockquote><div><br></div><div>protoc can already do something like that but it spits out a makefile includable file.</div><div><br></div><div>see --dependency_out=FILE option.</div><div><div>Write a dependency output file in the format</div><div>                              expected by make. This writes the transitive</div><div>                              set of input file paths to FILE</div></div><div><br></div><div>moreover the generated makefile depends on the langage generator used</div><div>(--cpp_out, --java_out, --python_out, ...) because dependencies are expressed between proto and </div><div>generated source files.</div><div><br></div><div>May be it would be possible to write a protoc "plugin" </div><div><a href="https://www.expobrain.net/2015/09/13/create-a-plugin-for-google-protocol-buffer/">https://www.expobrain.net/2015/09/13/create-a-plugin-for-google-protocol-buffer/</a><br></div><div><br></div><div>which would spit out easy to digest dep spec for CMake.</div><div><br></div><div>Unfortunately I'm not volunteering :-( just giving some idea.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
> so the cheap solution would be to add an argument to PROTOBUF_GENERATE_CPP() <br>
> to list proto-files these proto-files depend on<br>
<br>
Yes, that would be a good intermediate solution.<br>
<br>
-Brad<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake-developers</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>