MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0003474 | CMake | CMake | public | 2006-07-03 08:52 | 2013-10-07 10:03 |
|
Reporter | Malte Clasen | |
Assigned To | Brad King | |
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | |
|
Summary | 0003474: SOURCE_GROUP creates empty groups when using multiple projects |
Description | Given the following CMakeLists.txt,
--------------------
SOURCE_GROUP("a1\\a2" "a.cpp")
PROJECT("a")
ADD_LIBRARY("a" STATIC "a.cpp")
SOURCE_GROUP("b1\\b2" "b.cpp")
PROJECT("b")
ADD_LIBRARY("b" STATIC "b.cpp")
--------------------
CMake creates the following project/group hierarchy for Visual C++ 8:
--------------------
a/a1/a2/a.cpp
a/b1
b/a1
b/b1/b2/b.cpp
--------------------
Those groups that contain another group are mirrored into the other project although they are empty in that context. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | source_group_targets_dos.patch (10,328) 2009-05-28 21:19 https://public.kitware.com/Bug/file/2288/source_group_targets_dos.patch
writeGroups.patch (2,679) 2013-02-04 04:54 https://public.kitware.com/Bug/file/4632/writeGroups.patch |
|
Issue History |
Date Modified | Username | Field | Change |
2008-07-23 20:07 | pixman20 | Note Added: 0012812 | |
2008-07-23 20:09 | pixman20 | Note Edited: 0012812 | |
2009-04-19 10:06 | Mikael Hedberg | Note Added: 0016071 | |
2009-05-28 21:19 | Jacob Repp | File Added: source_group_targets_dos.patch | |
2009-05-28 21:24 | Jacob Repp | Note Added: 0016588 | |
2009-08-14 10:16 | Amit | Note Added: 0017132 | |
2009-08-14 10:16 | Amit | Note Added: 0017133 | |
2009-08-14 10:16 | Amit | Note Deleted: 0017133 | |
2011-09-01 05:25 | Pjotr Svetachov | Note Added: 0027316 | |
2012-10-10 01:39 | Graham Menhennitt | Note Added: 0031199 | |
2013-01-24 01:52 | mika rajala | Note Added: 0032143 | |
2013-02-04 04:54 | Anton Helwart | File Added: writeGroups.patch | |
2013-02-04 05:02 | Anton Helwart | Note Added: 0032190 | |
2013-03-08 10:28 | Brad King | Note Added: 0032540 | |
2013-03-08 10:28 | Brad King | Assigned To | Bill Hoffman => Brad King |
2013-03-08 10:28 | Brad King | Status | assigned => resolved |
2013-03-08 10:28 | Brad King | Resolution | open => fixed |
2013-03-08 10:28 | Brad King | Fixed in Version | => CMake 2.8.11 |
2013-03-08 10:28 | Brad King | Target Version | => CMake 2.8.11 |
2013-10-07 10:03 | Robert Maynard | Note Added: 0033985 | |
2013-10-07 10:03 | Robert Maynard | Status | resolved => closed |
Notes |
|
(0012812)
|
pixman20
|
2008-07-23 20:07
(edited on: 2008-07-23 20:09) |
|
Can we expect this bug to be fixed in the next version of CMake since it appears that the ticket was submitted over 2 years ago? I am using CMake 2.6 and it is still mirroring the subfolders.
|
|
|
(0016071)
|
Mikael Hedberg
|
2009-04-19 10:06
|
|
I'm also interested in the status of a fix for this bug. |
|
|
(0016588)
|
Jacob Repp
|
2009-05-28 21:24
|
|
I've attached a patch (with dos line endings) that addresses this issue on the 2.6.4 source release. I ran into this while converting our build system to cmake. This patch adds an optional parameter to source_group which is TARGET. After TARGET you specify the name of the target that the source group exists in. The reason this is done is because source group definitions can exist for multiple targets (even recursively) due to the way that source groups are handled by cmake. This provides you with the most control and flexibility when defining your source groups. The behavior of source groups is not altered when the TARGET parameter is not used.
Example:
SOURCE_GROUP(a1\\a2 TARGET a FILES a.cpp)
PROJECT(a)
ADD_LIBRARY(a STATIC a.cpp)
SOURCE_GROUP(b1\\b2 TARGET b FILES b.cpp)
PROJECT(b)
ADD_LIBRARY(b STATIC b.cpp) |
|
|
(0017132)
|
Amit
|
2009-08-14 10:16
|
|
I'm interested in a fix of this bug. |
|
|
(0027316)
|
Pjotr Svetachov
|
2011-09-01 05:25
|
|
We also ran into this bug and while it is just a minor annoyance a fix would be nice. |
|
|
(0031199)
|
Graham Menhennitt
|
2012-10-10 01:39
|
|
Yes, please fix this. It's very annoying.
Thanks |
|
|
(0032143)
|
mika rajala
|
2013-01-24 01:52
|
|
6 years later and no fix?
I'm supposed to try and "sell" cmake usage to my teammates today and this bug is bound to come up.
Please fix this! |
|
|
(0032190)
|
Anton Helwart
|
2013-02-04 05:02
|
|
Hi,
I wrote a small patch (writeGroups.patch) to fix this problem in the Visual Studio 7 generator.
It makes the WriteGroup methode return true, if a group or any of its
children have source files.
The children write their output to a temporay cmOStringStream and its only
added to the real output, if it is not empty.
I hope the patch can be of some use.
Regards, Anton |
|
|
(0032540)
|
Brad King
|
2013-03-08 10:28
|
|
|
|
(0033985)
|
Robert Maynard
|
2013-10-07 10:03
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|