forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEnableVisualStudioCodeAnalysis.props
24 lines (23 loc) · 1.5 KB
/
EnableVisualStudioCodeAnalysis.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Platform)'=='x64'">
<EnableCppCoreCheck>true</EnableCppCoreCheck>
<CodeAnalysisRuleSet>NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
<!-- External libraries are in or below the directory with the sln file. Source is under \onnxruntime so not affected by this.
Also need to exclude things under \cmake such as \cmake\external\protobuf, and the easiest way to do that in all
environments is to use the directory this file is in.
-->
<CAExcludePath>$(SolutionDir);$(MSBuildThisFileDirectory)</CAExcludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<!-- the C++ Core Guidelines Code Analysis is constantly being updated. We have different VS versions
in different CI setups, as well as locally, so the list of warnings is not consistent. New VS versions
add new checks, and fix false positives. Due to that, setting warnings to errors would make for a
painful setup that wasted too much developer time chasing down different warnings between local,
CPU CI and GPU CI builds.
Local builds on the latest VS version should compile warning free.
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
-->
</PropertyGroup>
</Project>