Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18641

Improve CMake project structure visualization using virtual folders

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 4.3.0, Qt Creator 4.3.1
    • Qt Creator 3.3.1, on Linux and Windows, and a variety of IDE's/compilers.

    Description

      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
      set_property(GLOBAL PROPERTY USE_FOLDERS ON)
      

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes