Uploaded image for project: 'Qt Creator'
  1. Qt Creator

Improve CMake project structure visualization using virtual folders


    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: Qt Creator 4.3.0, Qt Creator 4.3.1
    • Fix Version/s: None
    • Labels:
    • Environment:
      Qt Creator 3.3.1, on Linux and Windows, and a variety of IDE's/compilers.


      I'm marking this as a bug since usability has taken a hit vs previous versions.

      Before 4.3 and the new CMake server mode, Qt Creator organised the files following the filesystem and CMake's add_subdirectory implied structure, which for most if not all users was enough and worked well. Since 4.3, the project tree has gained some quirks: each target has an additional <Source Directory> subtree, which increases the complexity in navigating the source files. Additionally, add_subdirectory projects' source files are shown to be in their subdirectory inside the <Source Directory>, even though they should not be.

      CMake has, for a long time, provided simple ways to structure the generated IDE project files, using a global property (to enable the per-target property), a per-target property and a command:

      • by calling

      one can enable:

      • the FOLDER target property: this will put a target into e.g. a Visual Studio "Solution Folder", allowing organisation of the different libraries/executables/... of the project/solution.
      • the command source_group allows one to specify how the IDE organises the separate files of a single target.

      For a real-life example, see my project: https://github.com/skui-org/skui

      The intended solution/file structure is generated when generating Visual Studio project files. The problematic structure is generated on e.g. Linux using the "CodeBlocks - Ninja" generator. The CodeBlocks generator handles virtual folders just fine, but Qt Creator does not.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              hunger Tobias Hunger
              blablabla Ruben Van Boxem
            • Votes:
              1 Vote for this issue
              5 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes