Cannot get CUDA classes to index

I am working on a project where I have CUDA classes defined in .cu/.cuh files. I want to use NSight Eclipse to debug the CUDA code on a remote computer, however, I am having issues getting Eclipse to index the project properly.

A simple example would be if I have 2 files:

costs.cuh

namespace project
{
class Costs
{
public:
  Costs(int start);
}
}

cost.cu

namespace project
{
  Costs::Costs(int start) {
    int test = 2;
  }
}

The code will compile and work fine but the Eclipse indexer will highlight Costs::Costs and say “Member declaration not found” even though I can Ctrl + Click it and it will take me to the declaration.

If these two files are simply renamed to have C++ filenames (.cpp/.h) then the indexing works all fine.

Has anybody had a similar issue?

Some meta info:

  • Using CUDA 10.0 as installed through the SDK for DriveOS
  • Nsight version 10.0
  • Eclipse CDT version 8.4.0.nvidia-qualifier
  • Kubuntu 16.04 with 4.15.0-64-generic kernel