[CMake] add_dependencies: Disallow use with INTERFACE_LIBRARY. WHY?!?

Roman Bolshakov roolebo at gmail.com
Tue Feb 17 20:36:56 EST 2015


I agree with Andrey, there should be a way to use interface library type with generated headers.




There's a workaround but it involves manual set up of extra dependencies solely for dependency tracking. You have to add dependency between a target which consumes the generated headers and a custom target which directly depends on the output of a custom command along with adding interface library into target_link_libraries of the consumer. Each additional target of the generated headers would require the extra dependency set up.




It would be much more natural to add a dependency between interface library and the custom target. 




Thanks,

Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150217/393dab87/attachment-0001.html>


More information about the CMake mailing list