source_group is broken when using regex and putting into "Source Files"
This issue was created automatically from an original Mantis Issue. Further discussion may take place here. The original description is reproduced below:
WORKS: source_group(Source\ Files\\Hello FILES directives/asm/test.c)
WORKS: source_group(Source\ Files2\\Hello REGULAR_EXPRESSION directives/asm/.*\\.c)
FAILS: source_group(Source\ Files\\Hello REGULAR_EXPRESSION directives/asm/.*\\.c)
It seems the explicit combination of using REGULAR_EXPRESSION and attempting to put the result inside "Source Files" fails (that is, Visual Studio does not show it in the sub-folder; it appears directly inside Source Files).
Steps to reproduce:
- Create a CMake file that sorts files using the above combination.
- Generate the CMake file.
- Notice that in Visual Studio it is not placed in the correct group.