<div dir="ltr">Hello everybody<div><br></div><div style>I'm trying to build a library from source files that are generated at build time. The setup is the following.</div><div style><br></div><div style><span class="" style="background-color:yellow"><span class="" style>Inputfiles</span></span> (Service.thrift) -> Thrift Compiler/Generator -> Several generated files (gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Service.h, gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Service.<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>, gen-<span class="" style="background-color:yellow"><span class="" style>cpp</span></span>/Types.h, [possibly more] -> Build Library -> Library (thrift-service.so)</div>
<div style><br></div><div style>The idea is to rebuild the library whenever one of the Service.thrift file changes.</div><div style>The problem is that I don't know the output of the generated files in advanced so I like to use all the files generated by the generator and pack them in a library.<br>
</div><div style><br></div><div style>I tried to use add_custom_command() but as I don't know what's the output of the generator I didn't succeed.</div><div style><br></div><div style>Is there a way to handle this scenario?</div>
<div style><br></div><div style>Regards</div><div style>Pascal</div><div style><br></div></div>