0
votes

How do I add options to my nvcc using nsight eclipse. I tried to modify the command option Under Project->Properties->Build->Settings->Tool Settings-> NVCC Compiler. I changed it from "nvcc" to "nvcc --someoption". However when it compiles I see this output "/usr/local/cuda-7.0/bin/nvcc -O3 -ccbin gcc-4.9 -std=c++11 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_52,code=sm_52 -odir "." -M -o "binomial.d" "../binomial.cu"

Notice that --someoption in not in it. How can I add an option in eclipse? I also noticed that I can change the command from nvcc to some gibberish and it still compiles so I think that option does not affect anything. If so how can I add compiler options which eclipse does not include in its gui.

1
Note that the only options you should be specifying are ones that are recognized by nvcc. Which options did you want to specify? The nsight EE GUI has options to specify most of the compiler options that you are likely to use. Note there is an -optf switch that is selectable under Project Settings... Build ... Settings...Tool Settings...Miscellaneous which will allow you to specify a file containing additional command line switchesRobert Crovella

1 Answers

1
votes

I would recommend using the -optf switch that is selectable under Project Settings... Build ... Settings...Tool Settings...Miscellaneous and add your own file to the project that contains whatever compiler switches you want to add.

I think most compiler switches are already covered in the GUI, however.