How can CMake be used to generate Makefiles with personalized commands?

Posted by Rizo on Stack Overflow See other posts from Stack Overflow or by Rizo
Published on 2010-06-17T22:35:16Z Indexed on 2010/06/17 22:53 UTC
Read the original article Hit count: 157

Filed under:
|
|
|
|

I like to keep my Makefiles flexible and multifunctional. One of the tasks I usually add to make command is tar, for example the following instruction does the job:

tar:
    tar -cvf $(PROGNAME).tar $(SRCS) Makefile

My question is: How can CMake be used to generate personalized commands like tar?
I would like to see some code samples.
For the full functionality it would be useful to create project's components and be able to use them as parameters.
(Exempli gratia: archive only header files or some specific library).

Thanks in advance for your answers!

© Stack Overflow or respective owner

Related posts about makefile

Related posts about make