I switched recently from Visual Studio to Qt Creator. I am still using the Visual Studio Compiler on Windows as CUDA has this as a dependency. CUDA uses some functions and keywords that are only valid when compiled by nvcc, so I did a workaround in Visual Studio to enable syntax highlighting for CUDA files:
#pragma once
#ifdef __INTELLISENSE__
#include <cuda.h>
#include <cuda_runtime.h>
#include <device_launch_parameters.h>
#define __CUDACC__
#include <device_functions.h>
#endif
This works in Visual Studio as the preprocessor macro __INTELLISENSE__
is only defined when Visual Studio itself parses the file, not during compilation. Now I wanted to know if there is also a macro that Qt Creator defines during parsing so that this workaround for coding CUDA still works.
Thanks Sven
Try