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

[CMake] source files not displayed properly in source group when located in subdirectories

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows
    • e5d9cb377990180dc75b1ec3b209c742e1c01522 (qt-creator/qt-creator/master)

    Description

      Assume the following file structure:

      CMakeLists.txt
      src/A/A.cpp
      src/X/X.cpp
      src/main.cpp

      With the following CMakeLists.txt file:

      cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
      project("Test")
      set(SRC_FILES src/A/A.cpp src/X/X.cpp src/main.cpp)
      add_executable(testapp ${SRC_FILES})
      source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC_FILES})

       

      This results in main.cpp not being put into "src" group Instead the full path in the file system is displayed. See screenshot.

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTCREATORBUG-23896
          # Subject Branch Project Status CR V

          Activity

            People

              hunger Tobias Hunger
              tynnyriolut Philip Hartmann
              Votes:
              5 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes