[CMake] Newbie about REGEX

Pascal Fleury fleury at users.sourceforge.net
Sun Feb 11 15:38:56 EST 2007


On Sunday 11 February 2007 17:52:28 Alexander Neundorf wrote:
> -------- Original-Nachricht --------

> > INSTALL( DIRECTORY . DESTINATION include PATTERN "*/*.h" )
> > or
> > INSTALL( DIRECTORY . DESTINATION include REGEX "^.*\\.h$" )
> >
> From looking at the man page I'd say you need the EXCLUDE keyword.


As I'd like to actually select only the *.h files and copy them, my 
understanding is that I do not need the EXCLUDE keyword. in fact, the manpage 
only says how the pattern is matched, but it does not state if a match will 
actually make it available to the INSTALL command, or ignore it. However, to 
me, the logical things would be to install only those that match. 

From my tests, it is also interesting that if I add the 'EXCLUDE' keyword, it 
*does* exclude all *.h files, but if I remove it, it will match all files....
I have also tried to exclude most unwanted files, and it works! But that is 
brittle, because the only thing I want to copy is the *.h file.

Is this a bug in cmake then ?

--paf


More information about the CMake mailing list