Search code examples
eclipsecudansight

How can I compile with gcc when using Nsight Eclipse Edition?


I have a small project in Nvidia's Nsight, which creates the makefiles for me. I want to use some SSE instructions and would like to compile cpp-files in the project with gcc instead of nvcc.

Is there a way to configure Nsight to do that or do I have to write the Makefile manually?

EDIT: .cu file should be compiled with nvcc of course.


Solution

  • You should be able to use GCC SSE instructions in the CU files - NVCC compiles all the host code with your platform compiler.

    If you still would like to use GCC, you have two options:

    1. Create two projects - one is a static library project compiled with NVCC and another a regular executable project compiled with GCC. Then you can setup Nsight to link the executable with your library. (You may also use NVCC for executable and GCC for the library)
    2. As @Eric mentioned, you can create a "Makefile Project" and write the makefile by hand.