Important: Please read the Qt Code of Conduct -

CMake CUDA QTCreator

  • OK so i setup a cmake project in QTCreator and my cuda program compiles correctly.
    But I get a warning: This file is not part of any project. The code model might have issues parsing this file properly.

    also qt creator goes not give any include headers in the auto complete.

    cmake tells me this is enough but i d like to get atlest come kind of code completion. can i fix this in any way?
    link text

    this is the contents of my cmake file

    cmake_minimum_required(VERSION 3.17)
    project(cutest LANGUAGES CUDA)

  • ok late reply. found an easy fix for this. go to
    Tools -> Options -> Environment -> MIME Types

    type .cu in the Filter tab. (just to search for the right type)
    click on text/vnd.nvidia.cuda.csrc and clear the*.cu in the patterns tab.

    now type c++ in the Filter tab.
    click on text/x-c++src and add*.cu;*.cuh in the patters tab. dont clear whats alredy here.