How do I specify a to only compile a cu file to ptx in nsight eclipse edition

I’m trying to develop an OptiX application inside nsight eclipse edition and for this to work I need to specify to only compile my .cu file to ptx and not perform a full compilation on it (I don’t need anything beyond the ptx)
Is there a way to do that?
The eclipse project settings menus are too convoluted to find out how to do that


Nsight EE does not support building PTX-only applications, meaning that the project should still emit executable among other artifacts (e.g. add a cpp source file with empty source function and ignore the executable)

To build PTX module:

  1. Right-click your project and open properties.
  2. Browse to Build/CUDA. Select "Switch to Advanced Mode"
  3. Press plus next to modules and select the CU source file you want to compile to PTX
  4. Select "PTX" radio button under module type

I tried this and I received the error:
Errors running CDT Builder
org.eclipse.cdt.managedbuilder.internal.core.ResourceConfiguration cannot be cast to org.eclipse.cdt.managedbuilder.core.IToolChain
I am using NSight version 6.5.
If I remove the settings it builds.

I am seeing the same error / behavior as lisap while attempting to follow eugeneo’s steps in NSight Version 8 in RHEL 7.4.