0
votes

Is it possible to have different compilers for different files in one project in Nsight Eclipse Edition? For instance, is it possible to edit, compile, link, and run the example here in Nsight without having to explicitly use the command line?
The case I'm facing is that I need to use c++11 headers in my cpp file, inside a CUDA project; but nvcc doesn't support it. So while I'm developing it in Nsight, I'd have to use command line to compile, link, and run the project.

1
One not-so-nice solution seems to be manually changing makefile for the project in the editor. Also I have found this very relevant post but don't quite understand the answer. - Farzad
That comment simply tells how to make NVCC use ICC for host code compilation. It will not enable (full) C++11 support as NVCC parser does not support it. - Eugene

1 Answers

1
votes

No, this is not possible for a variety of reasons...

One common solution is to split the project into two - one that produces static library and another that produces an executable and links to the static library. Then you put all your NVCC-compiled CUDA code into either project and C++11 code into another.