[CMake] Output of ADD_CUSTOM_COMMAND generated multiple times

Martin Apel martin.apel at simpack.de
Wed Oct 8 07:26:28 EDT 2008


Alan W. Irwin wrote:
> On 2008-10-07 16:09-0400 Brad King wrote:
>
>> Now targets b and c and build in parallel, but neither will build until
>> 'a' is generated.
>
> Thanks, Brad, for your further explanation and example.  My method
> (which I
> started to use as a result of misinterpreting something you said on this
> topic before) appears to work, but yours is certainly more logical and
> will
> most likely result in faster parallel builds (because of the
> serialization
> used by my method).  If your example isn't in the wiki, it should be.

The only unfortunate side effect of this approach of defining a separate
target for each custom command is that
I start drowning in the make output "Build target x", because I have
lots of these dependencies.
I think CMake should be smart enough to handle this without the extra
targets, at least as long as all of them are in
the same directory. That is what the "generated" attribute of a source
file is about, isn't it.
But for now, I will modify my CMakeLists.txt to contain the extra targets.

Regards,

Martin
____________
Virus checked by G DATA AntiVirus
Version: AVB 19.56 from 08.10.2008




More information about the CMake mailing list