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

CMake Project view mishandles source_group(TREE)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • Qt Creator 4.11.0-rc1
    • None
    • Linux/X11

    Description

      similar to other bug, bug a bit different QTCREATORBUG-23128

       from the source_group documentation https://cmake.org/cmake/help/latest/command/source_group.html

      a project with `source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR})` should have the same effect as manually defining the tree structure. But currently with QtCreator 4.11-RC1 we get a group named TREE with all the files in it

       cmake
       cmake_minimum_required(VERSION 3.15)
       project(folderstructure)
       set(files
       src/a/file_a.cpp
       src/b/file_b.cpp
       include/a/file_a.h
       include/b/file_b.h)
       add_library(l1 SHARED ${files})
       target_include_directories(l1 PUBLIC include)
       source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR})

      expected structure

      • l1
        • src
          • a
            • file_a.cpp
          • b
            • file_b.cpp
        • include
          • a
            • file_a.h
          • b
            • file_b.h

      what we actually get

      • l1
        • TREE
          • file_a.cpp
          • file_a.h
          • file_b.cpp
          • file_b.h

      Attachments

        Issue Links

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

          Activity

            People

              hunger Tobias Hunger
              neroburner Nero Burner
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes