MantisBT - CMake
View Issue Details
0013424CMakeCMakepublic2012-07-19 07:412016-06-10 14:31
corneliup 
Kitware Robot 
highmajoralways
closedmoved 
x32 x64WindowsWindows XP
CMake 2.8.6 
 
0013424: SOURCE_GROUP creates empty groups in the same VS project
For the following lines extracted from the CMakeLists.txt

--------------------------------------------------------------------
source_group("Extra Headers L1\\Extra Headers L2\\Extra Headers L3")
source_group("Extra Headers")
--------------------------------------------------------------------

the following source group is created in the VS project

"Extra Headers L1\Extra Headers L2"

On the other hand, the "Extra Headers" source group is not created.

This behavior is neither consistent (one empty source group is created - most likely because it is nested, another one is not created), nor as expected - please see below.

Expected behavior: do not created nested source groups (or at least do not display them in the VS project view), even if they are nested.

- go on a Windows machine
- unzip attached file
- "chdir CMakeSourceGroup"
- "BuildProject.bat"
- open the generated solution file "build\CMakeSourceGroup.sln" and check the "hey" project
In addition to forbidding empty source groups, it would be great if the SOURCE_GROUP command could also be associated to a specificied target (by adding a TARGET parameter in the command) and not for all CMake targets (VS projects) of the whole CMake project (VS solution).
No tags attached.
zip CMakeSourceGroup.zip (3,003) 2012-07-19 07:41
https://public.kitware.com/Bug/file/4396/CMakeSourceGroup.zip
Issue History
2012-07-19 07:41corneliupNew Issue
2012-07-19 07:41corneliupFile Added: CMakeSourceGroup.zip
2012-07-19 07:45corneliupNote Added: 0030083
2012-08-02 10:06corneliupNote Added: 0030157
2013-02-12 04:39corneliupNote Added: 0032249
2016-06-10 14:28Kitware RobotNote Added: 0042093
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030083)
corneliup   
2012-07-19 07:45   
Sorry, in the above description please read:

"Expected behavior: do not create empty source groups (or at least do not display them in the VS project view), even if they are nested."
(0030157)
corneliup   
2012-08-02 10:06   
Could someone please validate this bug and post some feed-back about it?
(0032249)
corneliup   
2013-02-12 04:39   
Could someone please validate this bug and post some feed-back about it?
(0042093)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.