Suppress warnings for external headers in VS2017 Code Analysis

前端 未结 1 1879
天命终不由人
天命终不由人 2020-12-16 06:05

I want to use the Code Analysis in Visual Studio 2017 but I\'m using Qt and it gives me a lot of warnings from the headers. I\'ve tried turning off warnings:



        
1条回答
  •  不思量自难忘°
    2020-12-16 06:15

    If you open your .vcxproj file, down the bottom you should see:

      
      
      
    

    below this you can add:

      
        $(QTDIR)\include;.\GeneratedFiles;$(IncludePath)
        $(QTDIR)\include;.\GeneratedFiles;$(CAExcludePath)
      
    

    Microsoft say there's a bug where CAExcludePath is overwritten by IncludePath but this is fixed in Visual Studio 2017 V15.3 and you'll only need to set CAExcludePath - I haven't verified this (I'll update this once I do).

    This answer came from How can I suppress warnings for external headers in VS2017 Code Analysis?

    0 讨论(0)
提交回复
热议问题