[Cmake] running another command

Andy Cedilnik andy . cedilnik at kitware . com
27 Dec 2002 10:06:59 -0500


Hi Nik,

Yes, you could do that. The reason for not doing that is because in
general you want to say:

ccmake
make 
make install

and you are done. By doing tricks with custom targets things are not the
same any more. So, the difference between custom targets and custom
commands is that custom targets are the drivers and custom commands do
the actions. Custom commands can be chained so that they do dependency
checking etc. In CMake 1.5 (development / CVS), there is an initial Java
building done, which is completely implemented using custom commands and
one custom target. 

				Andy

On Fri, 2002-12-27 at 09:32, Nikhil Kriplani wrote:
> If I wanted to run a simple shell command such as this, I could also use 
> ADD_CUSTOM_TARGET(TargetName sh file.sh). Is that right?
> Then I could say make TargetName and element_headers.h will be created. All 
> the work is done by mkheaders.sh anyway.
> Why do I need the whole ADD_CUSTOM_COMMAND definition?