Skip to content

Re-disable warnings on CUDA builds for MSVC

In an earlier commit, we took out the "-w" flag for CUDA builds, which disables all compiler warnings. The original reason for disabling warnings was an errant warning about unused functions. It was taken out because the visual studio compiler complains when this flag overrides another warning flag (such as /W3).

Although the visual studio compiler was not complaining about unused functions, we were getting lots of other warnings. These warnings did not seem to actually come from the visual studio compiler. They probably come from whatever CUDA uses for a device compiler. But it is unclear how to specifically target these warnings.

So, the easiest solution is to add the "-w" flag back. To get around the other warning, we now (hopefully temporarily) remove warning flags from CMAKE_CXX_FLAGS to prevent the conflicting flags.

Merge request reports