[CMake] Newbie about REGEX
Alan W. Irwin
irwin at beluga.phys.uvic.ca
Sat Feb 10 20:05:12 EST 2007
On 2007-02-11 01:54+0100 Pascal Fleury wrote:
> Hi!
>
> I got recently to the wonderful cmake land, and seem to have a
> bumpier-than-needed road on this:
>
> INSTALL( DIRECTORY . DESTINATION include PATTERN "*/*.h" )
>
> or
>
> INSTALL( DIRECTORY . DESTINATION include REGEX "^.*\\.h$" )
>
> The current dir '.' contains a couple of subdirs, which contains both *.cpp
> and *.h and CVS files/dirs.
> In both cases, it installs absolutely all files found in '.' into the target
> include dir, keep the dir structure though. I expected it to filter out
> anything that is not a header file (*.h). What am I doing wrong with this ?
Try four escapes, i.e., REGEX "^.*\\\\.h$". I am not sure four escapes
are needed in all REGEX contexts, but I am aware of at least one where they are
needed so it is worth a try in this case.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
More information about the CMake
mailing list