View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013425CMakeCMakepublic2012-07-19 07:512016-06-10 14:31
ReporterS. Paris 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformwinOSwin7 64OS Version
Product VersionCMake 2.8.8 
Target VersionFixed in Version 
Summary0013425: source_group displays empty groups (when nesting)
DescriptionIssue applicable for Visual Studio projects.

When using source_group to define nested groups with some files, those groups are displayed even if they do not contain files for a given target.

In my case, I have two targets, with source_groups defined for target#1 and containing some files. Those files being referenced as sources for target#1, they are displayed correctly and classified in the good group.
But, those files not being part of target#2, the groups are still displayed in the Visual Studio project (but the most nested group).

Even if this issue is non-blocking, it is a pain in my case where I classify lots of sources in groups for several targets in the same project. It results with a lot of noisy empty groups in all of my projects.
Steps To ReproduceJust put the following wherever in your CMakeLists.txt, and build using a Visual Studio generator (the files do not have to be referenced).

source_group(test FILES test)
source_group(test\\test1 FILES test1)
source_group(test\\test1\\test2 FILES test2)

As a result, you will see the following empty project folders for your target:
|-test
| |-test1
Additional InformationI assume that there is a bug in the CMake source code when checking if a group must be displayed or not: the group is tested to be empty, but accounting for sub-groups as well without recursing through them to check if themselves are empty as well. That would explain why the hierarchy of empty groups does not display the last empty group (this one not having any file nor sub-group).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0030084)
S. Paris (reporter)
2012-07-19 08:01

Oups, duplicates this one: http://public.kitware.com/Bug/view.php?id=13424 [^]
(0042094)
Kitware Robot (administrator)
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.

 Issue History
Date Modified Username Field Change
2012-07-19 07:51 S. Paris New Issue
2012-07-19 08:01 S. Paris Note Added: 0030084
2016-06-10 14:28 Kitware Robot Note Added: 0042094
2016-06-10 14:28 Kitware Robot Status new => 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


Copyright © 2000 - 2018 MantisBT Team