On 9. Jun, 2010, at 17:47 , Hariharan Iyer wrote:

> This may not be only because of using add_custom_target, but I have the 
> following problem. I have a custom target that depends on a generated file, 
> as:
> add_custom_target(foo DEPENDS bar)
> 
> where "bar" is a generated file, generated using add_custom_command.
> 
> If I build the "foo" target by itself, it builds perfectly. However, if I 
> build the default "all" target, "foo" does not get built. My top-level 
> listfile has add_subdirectories(foo), and the custom target line above is 
> present in the listfile for the "foo" directory.
> 
> What am I missing or doing wrong?
> 
> Regards,
> Hari
> 

Read the docs more carefully? ;-) You need to add ALL as an option to the 
add_custom_target command.

Michael

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to