[Cmake] Problem with Regular expressions

Brad King brad . king at kitware . com
Thu, 7 Aug 2003 12:03:26 -0400 (EDT)


Amit,

> I am using SOURCE_GROUP( )  command with a regular expression to group
> all *.s *.S files with ".*\.[sS]$" . Cmake gives error that it does not
> support this expression. For grouping all the *.txt & *.cmake files with
> ".*(.txt | .cmake )$", then too it does not group these files.

Try these expressions:

  "\\.[Ss]$"
  "\\.(txt|cmake)$"

The first level of backslash escapes makes it through the cmake argument
parsing.  The second level is used by the regular expression parsing
inside CMake.

-Brad