You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e6aab2
Browse filesBrowse the repository at this point in the historyBrowse files
Turns on analysis in the default mode. Analysis output goes to the **Output** window like other error messages. Use **/analyze-** to explicitly turn off analysis.
32
-
33
+
Turns on analysis in the default mode. Analysis output goes to the **Output** window like other error messages. Use **/analyze-** to explicitly turn off analysis.
34
+
33
35
/analyze:WX-
34
-
Specifying **/analyze:WX-** means that code analysis warnings are not treated as errors when you compile by using **/WX**. For more information, see [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md).
35
-
36
+
Specifying **/analyze:WX-** means that code analysis warnings are not treated as errors when you compile by using **/WX**. For more information, see [/w, /W0, /W1, /W2, /W3, /W4, /w1, /w2, /w3, /w4, /Wall, /wd, /we, /wo, /Wv, /WX (Warning Level)](../../build/reference/compiler-option-warning-level.md).
37
+
36
38
/analyze:log`filename`
37
-
Detailed analyzer results are written as XML to the file that is specified by `filename`.
38
-
39
+
Detailed analyzer results are written as XML to the file that is specified by `filename`.
40
+
39
41
/analyze:quiet
40
-
Turns off analyzer output to the **Output** window.
41
-
42
+
Turns off analyzer output to the **Output** window.
43
+
42
44
/analyze:stacksize`number`
43
-
The `number` parameter that is used with this option specifies the size, in bytes, of the stack frame for which warning [C6262](/visualstudio/code-quality/c6262) is generated. If this parameter is not specified, the stack frame size is 16KB by default.
44
-
45
+
The `number` parameter that is used with this option specifies the size, in bytes, of the stack frame for which warning [C6262](/visualstudio/code-quality/c6262) is generated. If this parameter is not specified, the stack frame size is 16KB by default.
46
+
45
47
/analyze:max_paths`number`
46
-
The `number` parameter that is used with this option specifies the maximum number of code paths to be analyzed. If this parameter is not specified, the number is 256 by default. Larger values perform more thorough checking, but the analysis might take longer.
47
-
48
+
The `number` parameter that is used with this option specifies the maximum number of code paths to be analyzed. If this parameter is not specified, the number is 256 by default. Larger values perform more thorough checking, but the analysis might take longer.
49
+
48
50
/analyze:only
49
-
Typically, the compiler generates code and does more syntax checking after it runs the analyzer. The **/analyze:only** option turns off this code generation pass; this makes analysis faster but compile errors and warnings that might have been discovered by the code generation pass of the compiler are not emitted. If the program is not free of code-generation errors, analysis results might be unreliable; therefore, we recommend that you use this option only if the code already passes code-generation syntax checking without errors.
50
-
51
-
## Remarks
52
-
For more information, see [Code Analysis for C/C++ Overview](/visualstudio/code-quality/code-analysis-for-c-cpp-overview) and [Code Analysis for C/C++ Warnings](/visualstudio/code-quality/code-analysis-for-c-cpp-warnings).
53
-
54
-
### To set this compiler option in the Visual Studio development environment
55
-
56
-
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
57
-
58
-
2. Expand the **Configuration Properties** node.
59
-
60
-
3. Expand the **Code Analysis** node.
61
-
62
-
4. Select the **General** property page.
63
-
64
-
5. Modify one or more of the **Code Analysis** properties.
65
-
66
-
### To set this compiler option programmatically
67
-
68
-
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.EnablePREfast%2A>.
Typically, the compiler generates code and does more syntax checking after it runs the analyzer. The **/analyze:only** option turns off this code generation pass; this makes analysis faster but compile errors and warnings that might have been discovered by the code generation pass of the compiler are not emitted. If the program is not free of code-generation errors, analysis results might be unreliable; therefore, we recommend that you use this option only if the code already passes code-generation syntax checking without errors.
52
+
53
+
/analyze:ruleset`<file_path>.ruleset`
54
+
Enables you to specify which rule sets to analyze, including custom rule sets that you can create yourself. When this switch is set, the rules engine is more efficient because it excludes non-members of the specified rule set before running. When the switch is not set, the engine checks all rules.
55
+
56
+
The rulesets that ship with Visual Studio are found in **%VSINSTALLDIR%\Team Tools\Static Analysis Tools\Rule Sets.**
57
+
58
+
The following sample custom rule set tells the rules engine to check for C6001 and C26494. You can place this file anywhere as long as it has a `.ruleset` extension and you provide the full path in the argument.
Enables the specified PREfast plugin as part of code analysis runs.
72
+
LocalEspC.dll is the plugin that implements concurrency-related code analysis checks in the range of C261XX warnings. For example, [C26100](/visualstudio/code-quality/c26100), [C26101](/visualstudio/code-quality/c26101), ..., [C26167](/visualstudio/code-quality/c26167).
73
+
74
+
To run LocalEspC.dll, use this compiler option: **/analyze:plugin LocalEspC.dll**
75
+
76
+
To run CppCoreCheck.dll, first run this command from a developer command prompt:
77
+
78
+
```cmd
79
+
set Esp.Extensions=CppCoreCheck.dll
80
+
```
81
+
82
+
Then use this compiler option: **/analyze:plugin EspXEngine.dll**.
83
+
84
+
## Remarks
85
+
86
+
For more information, see [Code Analysis for C/C++ Overview](/visualstudio/code-quality/code-analysis-for-c-cpp-overview) and [Code Analysis for C/C++ Warnings](/visualstudio/code-quality/code-analysis-for-c-cpp-warnings).
87
+
88
+
### To set this compiler option in the Visual Studio development environment
89
+
90
+
1. Open the project's **Property Pages** dialog box. For details, see [Working with Project Properties](../../ide/working-with-project-properties.md).
91
+
92
+
1. Expand the **Configuration Properties** node.
93
+
94
+
1. Expand the **Code Analysis** node.
95
+
96
+
1. Select the **General** property page.
97
+
98
+
1. Modify one or more of the **Code Analysis** properties.
99
+
100
+
### To set this compiler option programmatically
101
+
102
+
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.EnablePREfast%2A>.
Copy file name to clipboardExpand all lines: docs/ide/vcpp-directories-property-page.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "VC++ Directories Property Page | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "03/09/2018"
4
+
ms.date: "04/26/2018"
5
5
ms.reviewer: ""
6
6
ms.suite: ""
7
7
ms.technology: ["cpp-ide"]
@@ -94,7 +94,7 @@ Directories to search for WinRT library files for use in Universal Windows Platf
94
94
Directories in which to search for source files to use for IntelliSense.
95
95
96
96
**Exclude Directories**<br/>
97
-
Directories not to search when checking for build dependencies.
97
+
Before each compilation, Visual Studio queries the timestamp on all files to determine whether any have been modified since the previous compilation. If your project has large stable libraries, you can potentially speed up build times by excluding those directories from the timestamp check.
Copy file name to clipboardExpand all lines: docs/linux/cmake-linux-project.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,21 +98,15 @@ cmake -E capabilities
98
98
99
99
In the output, look for “serverMode”:true. Note that even when you compile CMake from source as described below you should check the capabilities when done. Your Linux system may have limitations that prevent server mode from being enabled.
100
100
101
-
To get started building from source in the shell for your Linux system make sure your package manager is up to date, and that you have git and cmake available. First, clone the CMake sources:
101
+
To get started building from source in the shell for your Linux system make sure your package manager is up to date, and that you have git and cmake available. First, clone the CMake sources from our repo where we use for Visual Studio's CMake support:
102
102
103
103
```cmd
104
104
sudo apt-get update
105
105
sudo apt-get install -y git cmake
106
-
git clone https://github.com/Kitware/CMake.git
106
+
git clone https://github.com/Microsoft/CMake.git
107
107
cd CMake
108
108
```
109
109
110
-
Next, make sure you are on a supported release of CMake for Visual Studio. We are actively tracking CMake development, but we cannot guarantee we support the latest. To build CMake 3.9.0 (for example), first run:
111
-
112
-
```cmd
113
-
git checkout tags/v3.9.0
114
-
```
115
-
116
110
Next, run the following commands:
117
111
118
112
```cmd
@@ -132,4 +126,4 @@ cmake -E capabilities
132
126
133
127
## See Also
134
128
[Working with Project Properties](../ide/working-with-project-properties.md)
135
-
[CMake Tools for Visual C++](../ide/cmake-tools-for-visual-cpp.md)
129
+
[CMake Tools for Visual C++](../ide/cmake-tools-for-visual-cpp.md)
0 commit comments