Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 9.0.2
-
Linux (Kubuntu 22.04), Cuda 12.0
Description
The inbuilt analyser in the editor shows me errors for .cuh and .h files. The errors are for example "Unsupported option '--exp-extended-lambda', Unsupported option ..". I guess, that creator tries to compile the file using clang for code warnings, supplies nvcc flags specified in the CMake file, and clang stops with errors. a regular build works correctly, which means, that CMake is setup correctly.
Here is a demo project:
CMakeLists.txt
cmake_minimum_required(VERSION 3.18)
project(cuda_test LANGUAGES CUDA CXX)
string(APPEND CMAKE_CUDA_FLAGS " --expt-extended-lambda --expt-relaxed-constexpr")
add_library(testlib kernel.cuh kernel.cu)
target_include_directories(testlib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
kernel.cuh and kernel.cu are empty. it's the same when using kernel.h. i've also attached the project as a zip.
The errors are shown, when you open the project in creator, and then click on kernel.cuh. kernel.cu does not show the error, but there is also no completion. after I added cu to the list of c++ sources in the mime types, it behaves the same as .cuh files.
the .cuh header also doesn't show under the Header Files. but that's a different bug and not so important.