[CMake] escaping!

Hendrik Sattler post at hendrik-sattler.de
Mon Dec 10 19:29:21 EST 2007


Am Dienstag 11 Dezember 2007 schrieb Andrew Roark:
> > 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.

I never saw a Windows system with an installed Python. Strange isn't it ;)
"find" wasn't present either, though...

HS


More information about the CMake mailing list