[CMake] ADD_CUSTOM_TARGET(target ALL) and Visual Studio

Sahn Lam sahn at pobox.com
Thu Jan 24 15:12:07 EST 2008


Hi,

I have a top level custom target that depends on a header file generated by
a custom command.  I want this custom target to be invoked first so the
generated header is built before any other targets needing the header are
built.

Adding the ALL keyword to ADD_CUSTOM_TARGET does what I want in make, but it
doesn't seem to work in Visual Studio.  The build order dialog shows that
the custom target is close to last and none of the other target depends on
it.

Is this expected? How do I get it to work without using ADD_DEPENDENCIES on
every single target that needs the generated header?

I tried it on both 2.4.8 and cvs.

Thanks,

Sahn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080124/bfd12d2e/attachment.htm


More information about the CMake mailing list