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

CMake headers produce "Warning: This file is not part of any project" until I "Rescan Project"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • Qt Creator 4.11.0-beta2
    • None
    • Windows 10 x64
      MSVC2017 x64 compiler
      CMake 3.15.2
    • Windows

    Description

      I have a CMake project, whose CMakeLists.txt does not reference .h files, but only .cpp files.

      However when opening those .h files, I get a message: "Warning: This file is not part of any project..." and the header file is filled with invalid Clang error messages.

      If I click the menu item "Build -> Rescan Project", the invalid Clang error messages are fixed and replaced by correct diagnostics.

      Is not including .h header files in CMakeLists.txt a supported configuration? Is this a bug that can be fixed?

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            anontt Anonymous (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes