[Cmake] forcing target.

Brad King brad.king at kitware.com
Tue Jul 27 17:34:42 EDT 2004


Christopher Baus wrote:

> I think I figured out how to force the CUSTOM_COMMAND..
> 
> I defined a bogus target like this:
> 
> ADD_CUSTOM_TARGET(FORCE ;)
> 
> Then I made the custom command depend on it like this:
> 
> ADD_CUSTOM_COMMAND( ... command properties ...
>                    DEPENDS FORCE
>                    )

This will happen to work for the Makefile generator because of the way 
it is implemented.  I do not think it will work for the Visual Studio 
generators, though, because VS will not recognize the custom command's 
dependency on the top-level target.

-Brad



More information about the Cmake mailing list