View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009863 | CMake | CMake | public | 2009-11-07 11:51 | 2010-06-11 16:04 | ||||
Reporter | chrislu | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-8 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0009863: source_groups not (always) working for Visual Studio 10 beta2 | ||||||||
Description | file(GLOB SOURCE_FILES ../sick_sad_world/*.cpp) list(APPEND PROJ_SOURCE_FILES ${SOURCE_FILES}) source_group(source_files/sick_sad_world FILES ${SOURCE_FILES}) when adding files to source groups without any files in the root source file. the source groups are missing in Visual Studio 10, even some files are not visible. when regarding the generated .vcxproj and vcxproj.filters files everything looks normal. so i think this could be an issue of VS10. BUT, when using a native solution/project file it is possible to create such a scenario. i created a repro case (attached file). when you add the commented part in the CMakeLists.txt file everything works as expected. this part only adds a dummy file to the root source_group. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | ![]() ![]() ![]() ![]() | ||||||||
Relationships | |||||||||||
|
Relationships |
Notes | |
(0018613) Jack Whitehead (reporter) 2009-11-29 15:46 |
I came across this problem too and have realised what the problem is. The *.filters file generator simply needs to declare a separate filter for those groups that have no files. For example: # Foo group is empty (i.e. it has no files directly): source_group( Foo\\Bar FILES main.cpp ) There needs to be the following in the .filters file: <Filter Include="Foo"> <UniqueIdentifier>{ %GUID% }</UniqueIdentifier> </Filter> In addition to this (which is currently being generated) <Filter Include="Foo\Bar"> <UniqueIdentifier>{ %GUID% }</UniqueIdentifier> </Filter> |
(0018795) chrislu (reporter) 2009-12-10 11:26 |
yes, i can confirm this. |
(0019640) chrislu (reporter) 2010-02-26 06:57 |
confirmed for Visual Studio 2010 RC1 |
(0020164) chrislu (reporter) 2010-04-13 14:48 |
confirmed with Visual Studio 2010 final version! This is a show stopper, completely unusable. |
(0020659) cbielow (reporter) 2010-05-08 06:56 |
I can confirm this too: VS 2010 RC1 10.0.30128.1 |
(0020662) cbielow (reporter) 2010-05-08 07:21 |
identical to http://www.cmake.org/Bug/view.php?id=10154 [^] and http://www.cmake.org/Bug/view.php?id=10555 [^] |
(0020792) chrisw (reporter) 2010-05-19 16:22 edited on: 2010-05-19 16:26 |
Hi, I created a patch to fix this (actually at least half of the credit goes to Jack Whitehead who figured this out). /edit: See 9863.patch. I just realized I accidentally added an unnecessary "#include <algorithm>", unfortunately I can't seem to withdraw and re-upload my attachment. |
(0020801) chrisw (reporter) 2010-05-20 09:59 |
Looks like my patch doesn't always work. I guess I'll look into this next weekend. |
(0020830) chrisw (reporter) 2010-05-26 15:53 |
I think I got it now, just a dumb mistake on my part. Uploaded an amended version of my patch -> chrisw_9863_2.patch |
(0020933) chrisw (reporter) 2010-06-07 13:45 |
Anyone interested in reviewing my patch? |
(0020985) cbielow (reporter) 2010-06-10 16:39 edited on: 2010-06-10 16:41 |
I used git clone -b release git://cmake.org/cmake.git [^] CMakeRel then applied your patch (required some conflict resolution but 'AddMissingSourceGroups(groupsUsed, sourceGroups);' is unchanged) and compiled CMake. WORKS LIKE A CHARM! (Win7 64bit, VS2010 10.0.30128.1 RC1Rel) (I'll attach the new patch [diff.patch] in case its needed. I really don't know in which branch it belongs) |
(0020986) chrisw (reporter) 2010-06-10 16:56 |
Thanks for your feedback. Looks like I forgot to mention that my patch (chrisw_9863_2.patch) belongs to tag v2.8.1 - sorry about that. |
(0020996) Brad King (manager) 2010-06-11 16:04 |
I've pushed out the fix to next: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d9dc9ac [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-11-07 11:51 | chrislu | New Issue | |
2009-11-07 11:51 | chrislu | File Added: sick_sad_world_cmake_vs10.zip | |
2009-11-29 15:46 | Jack Whitehead | Note Added: 0018613 | |
2009-12-10 11:26 | chrislu | Note Added: 0018795 | |
2010-02-26 06:57 | chrislu | Note Added: 0019640 | |
2010-04-13 14:48 | chrislu | Note Added: 0020164 | |
2010-05-08 06:56 | cbielow | Note Added: 0020659 | |
2010-05-08 07:21 | cbielow | Note Added: 0020662 | |
2010-05-19 16:20 | chrisw | File Added: 9863.patch | |
2010-05-19 16:22 | chrisw | Note Added: 0020792 | |
2010-05-19 16:26 | chrisw | Note Edited: 0020792 | |
2010-05-20 09:59 | chrisw | Note Added: 0020801 | |
2010-05-26 13:24 | Bill Hoffman | Status | new => assigned |
2010-05-26 13:24 | Bill Hoffman | Assigned To | => Bill Hoffman |
2010-05-26 15:49 | chrisw | File Added: chrisw_9863_2.patch | |
2010-05-26 15:53 | chrisw | Note Added: 0020830 | |
2010-06-07 13:45 | chrisw | Note Added: 0020933 | |
2010-06-10 16:39 | cbielow | Note Added: 0020985 | |
2010-06-10 16:40 | cbielow | File Added: diff.patch | |
2010-06-10 16:41 | cbielow | Note Edited: 0020985 | |
2010-06-10 16:56 | chrisw | Note Added: 0020986 | |
2010-06-11 13:53 | Bill Hoffman | Assigned To | Bill Hoffman => Brad King |
2010-06-11 16:04 | Brad King | Note Added: 0020996 | |
2010-06-11 16:04 | Brad King | Status | assigned => closed |
2010-06-11 16:04 | Brad King | Resolution | open => fixed |
2010-06-11 16:04 | Brad King | Relationship added | has duplicate 0010154 |
2010-06-11 16:05 | Brad King | Relationship added | has duplicate 0010555 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |