[CMake] Newbie about REGEX

Pascal Fleury fleury at users.sourceforge.net
Sun Feb 11 17:24:47 EST 2007


On Sunday 11 February 2007 22:59:41 Alan W. Irwin wrote:
> I just read the man page again out of curiosity, and it is clear from the
> example that the rule is everything in the specified directories will be
> installed except for what is EXCLUDEd.  So the pattern and/or regex
> specifies a certain subset of the files in the directories which are
> EXCLUDEd or which have special permissions set.  Nothing else.

Mmhm, ok. But this is kind of misleading, because the EXCLUDE keyword is 
optional. So from this, I inferred that I can specify a pattern there. So 
actually EXCLUDE and PERMISSIONS are exclusive, but you need one for the 
PATTERN or REGEX to have any effect. So this should be clearer in the doc, I 
wish, that you can only limit the set of copied files by explicit listing of 
exclusions, not explicit listing of inclusion.

> For example, if these header files are not generated, why not simply
> specify them explicitly as a list or generate that list implicitly with
> "FILE(GLOB ....". Then INSTALL that list of files.  Or if the headers are
> generated files, then I suggest generating them in their own directory for
> which you can then use "INSTALL( DIRECTORY ....") without having to exclude
> anything.

As I mentioned in my first posting, I am a total cmake newbie, and just 
discovered the FILE(GLOB,*) command. My headers are not generated, so that 
will do.

Thanks for all who helped!

--paf


More information about the CMake mailing list