View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010555CMakeCMakepublic2010-04-15 08:112010-06-11 16:05
Reporterchrislu 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0010555: source_groups not working as expected for Visual Studio 10
Descriptionfile(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 a source group without any files in the root source file, the source group is missing in Visual Studio 10. there are even some files not visible at all. when inspecting 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.

The problem seems to be the following: 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>
TagsNo tags attached.
Attached Fileszip file icon sick_sad_world_cmake_vs10.zip [^] (1,042 bytes) 2010-04-15 08:11

 Relationships
duplicate of 0009863closedBrad King source_groups not (always) working for Visual Studio 10 beta2 

  Notes
(0020661)
cbielow (reporter)
2010-05-08 07:20

identical to
http://www.cmake.org/Bug/view.php?id=10154 [^]
and
http://www.cmake.org/Bug/view.php?id=9863 [^]

 Issue History
Date Modified Username Field Change
2010-04-15 08:11 chrislu New Issue
2010-04-15 08:11 chrislu File Added: sick_sad_world_cmake_vs10.zip
2010-05-08 07:20 cbielow Note Added: 0020661
2010-06-11 16:05 Brad King Relationship added duplicate of 0009863
2010-06-11 16:05 Brad King Status new => closed
2010-06-11 16:05 Brad King Resolution open => duplicate


Copyright © 2000 - 2018 MantisBT Team