[CMake] bug ? changed behaviour of ADD_CUSTOM_COMMAND

Alexander Neundorf a.neundorf-work at gmx.net
Fri Sep 16 09:59:54 EDT 2005


> Von: Brad King <brad.king at kitware.com> 
> 
... 
> The original behavior was not intentional.  The DEPENDS option of  
> ADD_CUSTOM_TARGET is meant for dependencies on the outputs of  
> ADD_CUSTOM_COMMAND.  It was just coincidence that the generated 
makefile  
> had the right dependencies, and I don't think it worked in other 
> generators. 
>  
> The way to add dependencies between top-level targets is with the  
> ADD_DEPENDENCIES command: 
>  
> ADD_CUSTOM_TARGET( world echo "world" ) 
> ADD_CUSTOM_TARGET( hello echo "hello" ) 
> ADD_DEPENDENCIES( world hello ) 
 
Ah, ok. 
Is it intentional that the following works ? 
 
ADD_CUSTOM_TARGET(foo COMMAND ps COMMAND ls COMMAND echo "hello world") 
 
i.e. that I can add multiple commands for one custom target ? I didn't 
knew that, it's cool. 
 
Bye 
Alex 
 

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++


More information about the CMake mailing list