James Bigler wrote:
Ah, yes. I also was getting globbing expressions and regular
expressions mixed up.
From the docs (and experimentation), it looks like CMake only supports
*, ?, and [], but not {} which would be required to do what we want:
file(GLOB_RECURSE sources "*.{h,cpp}")
CMake uses a simple conversion from glob to regex, the code for that can
be found here:
http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/kwsys/Glob.cxx?revision=1.16&root=CMake&view=markup
It does a simple glob with *,?, and [], and that is about it.
The best thing to do would be to try using a glob expression from a bash
shell and ls. For example, the first one you gave does not work
.[hi]pp. It was added to cmake to give simple globs like *.c *.cxx *.h,
etc.
-Bill
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake