Here is a solution that will work with Eclipse CDT, Visual Studio or Qt Creator. This is my solution:
#if (defined __CDT_PARSER__) || (defined __INTELLISENSE__) || (defined Q_CREATOR_RUN)
#define __global__
#define __device__
#define __host__
#define __shared__
#define CUDA_KERNEL_DIM(...)
#else
#define CUDA_KERNEL_DIM(...) <<< __VA_ARGS__ >>>
#endif
Then call the kernels with:
myKernel CUDA_KERNEL_DIM(gridDim, blockDim) (foo, bar);