User and Reference Guide for the Intel® C++ Compiler 14.0
The following applies to Microsoft Visual Studio* 2010 and 2008.
To build your application for static analysis in Microsoft Visual Studio*, use the Build for Intel Static Analysis menu option.
There are several forms of the Build for Intel Static Analysis menu option, including:
The first time Build for Intel Static Analysis is selected, a Create configuration dialog box appears to create a new build configuration for static analysis called Intel_SSA with the required properties for the Visual Studio* IDE.
In the Create configuration dialog box, set the following:
Copy configuration settings from: Specify the configuration from which settings should be copied.
Level of Static Analysis: Select the desired level of analysis.
Mode of Static Analysis: Choose one of the following modes:
Additional Options: Choose these options to analyze include files, individual files, or to treat enumerations as known ranges.
Build for Static Analysis after creating configuration: Check this box to create a new configuration called Intel_SSA build the selected project(s) using static analysis. If the checkbox is not checked, configuration for static analysis will be created and will run the next time Build for Intel Static Analysis is selected.
To perform static analysis on Intel® C++ solutions and projects:
Analysis results will open automatically in the Intel® Inspector XE user interface.
To perform static analysis on Visual C++* only solutions and projects or on a mixed solution containing both Intel® C++ and Visual C++* projects, do the following:
For Visual Studio* 2008: Check and uncheck projects in the Prepare Projects dialog box that appears. This dialog box shows all Visual C++* projects in the solution. Initially, all Visual C++* projects are selected for static analysis. Uncheck any projects that do not require it. Click Next.
Existing configurations will not be modified. The Solution Explorer view will show a different icon to indicate that a project configuration is built by the Intel® C++ Compiler.
Analysis results will open automatically in the Intel® Inspector XE user interface.
Preparing a Visual C++* project for use with static analysis does not cause the existing configurations to build with the Intel compiler. However, it does modify the solution (.sln) file and adds an Intel project (.icproj) file for each prepared project. After these changes, the solution will no longer build on systems where the Intel® C++ Compiler is not installed. In a team environment where some team members will not install the Intel® C++ Compiler, it is best to treat these modifications as temporary and discard them after running static analysis. You can always use the menu item to perform the preparation step again as needed.
There are several Visual Studio* IDE property pages related to static analysis. You can change the options for static analysis by modifying the properties for the Intel_SSA configuration. To do this, use the following property pages:
C/C++ > Diagnostics > Analyze Include Files
C/C++ > Diagnostics > Analysis results container
The default location is My Inspector XE Results-<product name> directory in the project root directory.
C/C++ > Diagnostics > Mode of Static Analysis
C/C++ > Diagnostics > Analyze Files Individually
C/C++ > Diagnostics > Treat Enumerations as Known Ranges