build.htm |
Use the tabs of the Project Configuration to specify various project settings to be used during analysis.
· Sources tab - Specify the source files to be analyzed. Described in detail in previous section, Adding Source Files to a Project.Refer to Adding Source Files to a Project for details about the Sources tab. The other Project Configuration tabs are discussed in the following sections.
Choose the Options tab in the Project Configuration dialog box to specify additional information to customize the analysis, including whether to record local objects and parameters, whether to cache include files for re-use, to note the compiler you use, and to enable or disable the prompting feature for missing include files.
- Prompt for Missing Includes
Choose the Include Dirs tab in the Project Configuration dialog to specify include paths. Specify any number of directory paths to search for include files used in the project. Include paths are not recursively searched, that is any subdirectories will not be searched for include files unless that subdirectory is explicitly specified in the list of include directories. Following is an example of the Include Dirs tab.
During analysis, the include path directories will be searched in the order that they appear in the dialog. Use the "Move Up" and "Move Down" buttons to re-order the include directories as desired.
Typically only include files that are not directly related to your project (such as system-level includes) and that you do not want to analyze fully are defined here. For project-level includes that you wish to be fully analyzed, be sure to add those include files as source files in the Sources tab.
Choose the Ignore Includes tab in the Project Configuration dialog to specify individual include files that you wish to ignore during analysis.
Any files that you choose to ignore when prompted during analysis will be added to this list.
C source code is often sprinkled with pre-processor directives providing instructions and options to the C compiler. Directives such as:
#define INSTRUMENT_CODEconfigure the software in ways that affect what it does and how it should be parsed.
Macros are often defined with directives (#define) in include files (.h files) or are passed in via the compiler (typically with the -D option).
For Understand for C++ to successfully analyze your C software it needs to know what macro definitions should be set to control actions of the pre-processor.
To define macros, select the Macros tab of the Project Configuration dialog:
The dialog manages a list of macros and their optional definitions. Each macro may be edited or deleted. Note that a macro must have a name, but that the definition is optional. This is commonly used in conjunction with #ifdef pre-processor conditional statements checking to see if macros are defined.
To edit the definition of an existing macro value but keep the same name, simply select the macro, modify the definition, and press Add.
To use an existing Macro as the basis for a new one, select the macro, edit the definition and the name, and then press Add. This will create a new macro.
Sometimes you have a lot of include paths and macros, or they are generated by some other process.
If so then you can specify a file prefixed by an @ sign.
For Macros the file is of the form:
#define foo barAll define a macro "foo" to be "bar".
For Include files, the file is just a list of directories in search order:
/usr/include/X11Note that these files can also be used with the command line analyzer "undc" described in Command Line Processing
Use the File Types tab in the Project Configuration dialog to specify how source files should be parsed. If a mix of C and C++ sources are in the project, also specify the file extensions used for each type.
When the project is configured as desired, click on the Save button and the configuration will be saved.
Cancel will close the dialog without saving your changes.
Scientific Toolworks, Inc. http://www.scitools.com Voice: (802) 763-2995 Fax: (802) 763-3066 support@scitools.com sales@scitools.com |