[CMake] find folder matching regex?

Joseph Garvin k04jg02 at gmail.com
Sun Oct 21 18:15:27 EDT 2007


I'm trying to write a FindBlitz.cmake file for the popular Blitz++ library (
http://www.oonumerics.org/blitz/). On windows, the folder containing blitz
is usually of the form C:/blitz-x.x (where x.x is a version number). I would
like to say, "Look for blitz/blitz.h in any folder matching
C:\blitz-[0-9]*.[0-9]* or C:\Program Files\blitz-[0-9]*.[0-9]*". But from
the docs it's not clear to me what the best way to do that is. The
PATH_SUFFIXES option for FIND_FILE doesn't appear to work with regular
expressions, and I don't see any way to iterate through all of the
subfolders of a directory, so I'm not sure what to try next. Maybe I'm
missing something obvious or there's a cool undocumented feature somewhere?
I'm just looking at the docs at http://cmake.org/HTML/Documentation.html.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071021/6f483eda/attachment.html


More information about the CMake mailing list