How to specify option to host compiler using nvcc

Options specified to host compiler in Nsight
-std=c++11 option specified to host compiler in Nsight

nvcc is the CUDA compiler driver that is used to compile both .cu and .cpp files. There are many options that be specified to nvcc for device code compilation. To specify options to the host compiler, place them after the option -Xcompiler.

If you are using Nsight, go to Project > Properties > Build > Settings > Tool Settings > NVCC Compiler > Build Stages. Add the compiler options that you want to the Preprocessor options (-Xcompiler) section.

Tried with: Nsight 5.5 and Ubuntu 12.04 LTS

Advertisements

One thought on “How to specify option to host compiler using nvcc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.