[CMake] ADD_DEFINITIONS with output from shell

David Sveningsson ext at sidvind.com
Tue May 6 19:13:07 EDT 2008


Hi, I am converting some makefiles for a large application. One of the 
makefiles adds the following to CFLAGS:

-DSVN_REVISION="\"`svn info|grep Revision| awk '{print $2}'`\""

(it runs some shell commands which will output the current subversion 
revision)

I tried searching for a way for cmake to run the above command but I 
found nothing. Is there a way to accomplish this?
-- 


//*David Sveningsson [eXt]*

Freelance coder | Game Development Student
http://sidvind.com

Thou shalt make thy program's purpose and structure clear to thy fellow 
man by using the One True Brace Style, even if thou likest it not, for 
thy creativity is better used in solving problems than in creating 
beautiful new impediments to understanding.


More information about the CMake mailing list