[CMake] failing target

Andrea Crotti andrea.crotti.0 at gmail.com
Tue Mar 6 10:24:19 EST 2012


On 03/06/2012 02:07 PM, Andrea Crotti wrote:
>
>
> I opened a thread some time ago about this, and I actually thought it
> was a bug in the documentation, because then why everything works 
> otherwise?
>
> This simple example which I produced
>
> add_custom_target(a
>   ${CMAKE_COMMAND} -E echo "a"
>   )
>
> add_custom_target(b
>   ${CMAKE_COMMAND} -E echo "b"
>   DEPENDS a
>   )
>
>
> does exactly what would be expected, even if there files a or b don't 
> exist.
> So I might suppose that this intra-target dependencies work but not 
> always,
> is that correct?

I tried to substitute the wrong DEPENDS with the add_dependencies and it 
seems to work now.
That doesn't explain why it works on Windows and my other Linux box, but 
well if that's the correct
way to do it I'll stick with that..


More information about the CMake mailing list