View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013370CMakeCMakepublic2012-07-02 17:352016-06-10 14:31
ReporterLordJZ 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSWindowsOS Version
Product VersionCMake 2.8.8 
Target VersionFixed in Version 
Summary0013370: Visual Studio filter tree as source directory tree (with patch)
DescriptionCurrently, CMake groups the source files into 'Header Files', 'Source Files', etc. When there are quite a lot of files, it becomes hard to navigate through this mess.

A lot of other IDEs make the same solution tree as directory tree. Netbeans in particular.

I have created a rough patch to implement this feature for Visual Studio.

Links:
My CMake fork with this feature: https://github.com/LordJZ/CMake/commits/master [^]
Direct patch file: https://dl.dropbox.com/u/9241118/cmake.patch [^] (also attached)
An example of the resulting tree: https://dl.dropbox.com/u/9241118/cmake-file-tree-respect-trinitycore.png [^]
Compiled binaries for Windows: https://github.com/downloads/LordJZ/CMake/cmake-file-tree-respect.7z [^] (no dependencies)

There are some issues of the patch:
1) Works for Visual Studio 10 (2010 pre-release), Visual Studio 2010, Visual Studio 11 (2012 pre-release), and Visual Studio 2012.
2) My changes are not yet fixed to fit CMake coding style.
3) The patch eliminates in-Studio view of source groups (though they are not seen in other IDEs). Seems to deprecate bug 0011229.
4) Is possibly still affected by bug 0007921.

RFC.
TagsNo tags attached.
Attached Filespatch file icon cmake.patch [^] (7,449 bytes) 2012-07-02 17:35 [Show Content]

 Relationships

  Notes
(0029886)
LordJZ (reporter)
2012-07-02 17:44
edited on: 2012-07-02 17:53

Related:
0002665
http://www.cmake.org/pipermail/cmake/2009-May/029340.html [^]
www.mail-archive.com/cmake@cmake.org/msg19509.html ( no copy-paste url: http://bit.ly/M1ndsg [^] )
http://www.cmake.org/Wiki/CMake_FAQ#How_To_Put_Files_in_Folders_in_Visual_Studio_Projects [^]
http://www.cmake.org/Wiki/CMake_User_Contributed_Macros#Visual_Studio_generator_helpers [^]

Related, but not affected:
0010555, 0009863, 0010154

(0030003)
Brad King (manager)
2012-07-09 09:53

This will be a nice feature. I think it should be enabled explicitly for two reasons:

(a) It will preserve behavior for existing projects
(b) It gives us a place to explicitly specify the common base path

The latter is especially important because adding/removing one source in a sibling directory to the previously-highest common path will change the entire structure.

Something like:

 set_property(TARGET myexe PROPERTY VS_GROUP_BY_DIR ${CMAKE_CURRENT_SOURCE_DIR})

To avoid setting it explicitly on every target we can add a SetPropertyDefault call in cmTarget to initialize the property from a "CMAKE_VS_GROUP_BY_DIR" variable.
(0042077)
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-02 17:35 LordJZ New Issue
2012-07-02 17:35 LordJZ File Added: cmake.patch
2012-07-02 17:44 LordJZ Note Added: 0029886
2012-07-02 17:45 LordJZ Note Edited: 0029886
2012-07-02 17:45 LordJZ Note Edited: 0029886
2012-07-02 17:46 LordJZ Note Edited: 0029886
2012-07-02 17:47 LordJZ Note Edited: 0029886
2012-07-02 17:53 LordJZ Note Edited: 0029886
2012-07-09 09:53 Brad King Note Added: 0030003
2016-06-10 14:28 Kitware Robot Note Added: 0042077
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