How to disable a specific nvcc compiler warnings

前端 未结 6 1620
无人及你
无人及你 2020-12-08 11:45

I want to disable a specific compiler warning with nvcc, specifically

warning: NULL reference is not allowed

The co

6条回答
  •  余生分开走
    2020-12-08 12:08

    I was using nvcc with the ubuntu g++ compilers, in my case openmpi mpic++. For the "-Wunused-result" of the g++ compiler the corresponding message suppress is "-Wno-unused-result". So passing it in the nvcc like -Xcompiler "-Wno-unused-result" worked for me.

提交回复
热议问题