Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1367

QBS ignores *.cu files as C++ source files

    XMLWordPrintable

Details

    • Linux/X11

    Description

      I'm trying to build a QBS project with Clang and to compile .cu files with "-x cuda" Clang's option. The C++ MIME type ".cu" has been set both system-wise and QtCreator-wise, but QBS ignores those files as sources. Here's the .qbs project file:

      import qbs;
      
      Product {
      
          property string cuda_dir: "/opt/cuda"
          property string cuda_sm: "sm_52"
      
          type: "application"
          consoleApplication: "true"
          name : "appp"
      
          files: [
                     // .h .cpp .cu .cuh files
          ]
      
          Depends { name: "cpp" }
          cpp.cxxLanguageVersion: "c++11"
      
          cpp.cxxFlags: [
              "-DGL_GLEXT_PROTOTYPES=1",
              "-xcuda",
              "--cuda-gpu-arch="+cuda_sm,
              "--cuda-path="+cuda_dir
          ]
      
          cpp.dynamicLibraries: [
              "GL",
              "GLU",
              "glut",
              "cudart_static",
              "dl",
              "rt",
              "pthread"
          ];
      
          cpp.includePaths: [cuda_dir + "/include"]
          cpp.libraryPaths: [cuda_dir + "/lib64"]
      
          Export {
              Depends { name: "cpp" }
              cpp.includePaths: [product.sourceDirectory]
          }
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            bongoyozo Josip Basic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes