[CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

Dan Liew dan at su-root.co.uk
Mon Nov 30 13:32:07 EST 2015


Hi,

On 30 November 2015 at 18:03, Dan Liew <dan at su-root.co.uk> wrote:
> Hi,
>
> On 30 November 2015 at 08:09, Petr Kmoch <petr.kmoch at gmail.com> wrote:
>> Hi Dan,
>>
>> you could look into the IMPLICIT_DEPENDS argument of add_custom_command:
>> https://cmake.org/cmake/help/latest/command/add_custom_command.html
>>
>> I don't have direct experience with it, but it looks like it could do what
>> you're looking for.
>
> Oh. That sounds exactly like what I'm looking for!

It works but only for makefile generators... That's an annoying
limitation. I'll file a feature request to get this implemented for
other generators.

Dan.


More information about the CMake mailing list