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

CppTools: CUDA sources are not categorized

    XMLWordPrintable

Details

    • Linux/X11
    • 964aefd4ec6fbb2c4b9b6afde692cf7b7907ec53 (qt-creator/qt-creator/master)

    Description

      CppTools::ProjectFile handles Cuda sources, but CppTools::ProjectFileCategorizer does not.  This leadsProjectInfoGenerator to yield an empty ProjectPart for Cuda sources, which in turn leads clangcodemodel to send arguments to clang which don't match the toolchain. 

      A one-liner fix which is working for me:

       

      --- A/src/plugins/cpptools/cppprojectfilecategorizer.cpp 2021-05-03 23:12:55.000000000 -0300
      +++ B/src/plugins/cpptools/cppprojectfilecategorizer.cpp 2021-05-16 14:29:00.995171287 -0300
      @@ -72,6 +72,7 @@ ProjectFiles ProjectFileCategorizer::cla
                   break;
               case ProjectFile::CXXSource:
               case ProjectFile::CXXHeader:
      +        case ProjectFile::CudaSource:
                   m_cxxSources += projectFile;
                   break;
               case ProjectFile::ObjCXXSource:
      

       

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            phollensen Paul Hollensen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes