MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013126 | CMake | CMake | public | 2012-04-13 06:47 | 2016-06-10 14:31 |
Reporter | kislinsk | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | MSVC | OS | Windows | OS Version | |
Product Version | CMake 2.8.7 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013126: SOURCE_GROUP does not work for regular expressions AND no-name groups | ||||
Description | CMake creates the default source groups (in context of MSVC "filters") "Header Files" and "Source Files" for convenience and puts all files to the appropriate group. This behavior can be overwritten by specifying own source groups and put each and every file to them. If there is any file left, both default source groups will be created. OK, fine so far. Imagine the following scenario where you want to put each file into a source group that matches its path: Foo.h Foo.cpp Bar/Bar.h Bar/Bar.cpp The following snippet works: source_group("" FILES Foo.h Foo.cpp) # no-name group -> no filter source_group(Bar FILES Bar/Bar.h Bar/Bar.cpp) add_executable(FooBar Foo.h Foo.cpp Bar/Bar.h Bar/Bar.cpp) No "Header Files" nor "Source Files" filters are generated, only the "Bar" filter containing Bar.h and Bar.cpp. Foo.h and Foo.cpp are located at the top level of the project. Perfect! Of course you have more files in a real world scenario so you may prefer to use the regular expression versions of source_group which work well except for the case of a no-name group: source_group("" "[^/]+\\.(cpp|h)") # BUG! source_group(Bar "Bar/[^/]+\\.(cpp|h)") For simplicity you can reduce the regular expressions to something like "Foo\\.(cpp|h)" and "Bar/Bar\\.(cpp|h)", it doesn't matter. With a regular expression no-name groups do not work at all. "Header Files" and "Source Files" filters are created and everything is put into them instead. | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-04-13 06:47 | kislinsk | New Issue | |||
2012-08-11 21:35 | David Cole | Status | new => backlog | ||
2012-08-11 21:35 | David Cole | Note Added: 0030401 | |||
2016-06-10 14:28 | Kitware Robot | Note Added: 0042023 | |||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|