[CMake] escaping!

Andrew Roark andrewjroark at yahoo.com
Mon Dec 10 19:12:45 EST 2007


> Is it possible to have a command like this?
> ADD_CUSTOM_COMMAND(OUTPUT ${my_file}
> ...
>            COMMAND find . -name "*xml" > /dev/null
> ...
> VERBATIM
> )

Not sure if you got a reply to this, nor if the following is any help, BUT...

For any tricky file operations (like "all files ending with XML greater than 2Kb using DOS newlines" etc) I would personally write a python script (e.g. ROOTDIR/util/xmlfinder.py) to do that work and make the command simply invoke the python script. This has the added advantage of being cross-platform as well, keeping the CMakeLists.txt file simpler.

HTH
Andrew



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



More information about the CMake mailing list