[CMake] Nested groups in MSVC

David Cole david.cole at kitware.com
Wed Aug 20 13:58:25 EDT 2008


It looks like it must be a bug of some sort if it works with one name, but
it does not work with another name...

However, you do have overlapping regular expressions. All of your files that
match the 2nd regular expression also match the 1st regular expression.

A better 1st regular expression might be:
"float/[^/]*"

(Instead of "zero or more of any character" it becomes "zero or more of
anything except for a / all the way to the end of the string"... which does
not match anything that the 2nd expression matches.)

If you can reproduce this with a simple example project, zip up the source
tree for it and submit it as a bug at http://public.kitware.com/Bug


Thanks,
David


On Tue, Aug 19, 2008 at 3:53 AM, Filip Konvička <filip.konvicka at logis.cz>wrote:

> Hi,
>
> defining the following:
>
> SOURCE_GROUP( "FloatVar"      REGULAR_EXPRESSION "float/.*" )
> SOURCE_GROUP( "FloatVar\\BI"  REGULAR_EXPRESSION "float/float/bi/.*" )
>
> with the following sources in the project:
>
> ADD_LIBRARY( mylib SHARED
>  float/float.hh
>  float/float/float_var.hh
>  float/float/float_view.hh
>  float/float/bi/delta.icc
>  float/float/bi/prop.hh
> )
>
> ends up with all source files in "FloatVar" group (there is no
> "FloatVar\\BI" group). However, specifying
>
> SOURCE_GROUP( "FloatVar"      REGULAR_EXPRESSION "float/.*" )
> SOURCE_GROUP( "FloatVar2\\BI" REGULAR_EXPRESSION "float/float/bi/.*" )
>
> creates two groups, FloatVar and FloatVar2\BI, with files correctly placed
> according to the regexs.
>
> This happens in all CMake versions I've seen, including 2.6.0 and 2.6.1.I'm using the MSVC 2008 generator with MSVC 2008 EE.
>
> Is this a bug, or am I doing something wrong?
>
> Best Regards,
> Filip
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080820/c321e2a1/attachment.htm>


More information about the CMake mailing list