CAST highly recommends that you use the CPP Compilation Database Discoverer extension instead of the C and C++ File Discoverer.
The CPP Compilation Database Discoverer extension detects projects based on the presence of specific build compilation output files and their content. It can be used in conjunction with:
This discoverer detects projects based on the presence of C or C++ files according to a list of extensions declared for these languages.
In what situation should you install this extension?
This extension should be used when you don't use Microsoft C/C++ projects to build your C/C++ application. Project files such as makefile are not supported by the discoverers provided "out of the box" in the CAST Delivery Manager Tool. Therefore, this extension acts as a kind of "catch-all" to ensure that all C and C++ files will be packaged for analysis.
When the extension is installed, you can choose to activate it (or not) in each package you create in the CAST Delivery Manager Tool. To do so, click the Package Configuration tab and define the type of projects to discover in the package (refer to the Packaging your source code with the CAST Delivery Manager Tool paragraph below).
Only one project is created per package when C or C++ files are detected (i.e. one project is equal to one Analysis Unit). This project will use the name of the top-folder that contains C or C++ files.
As such, given the following folder structure (for example):
Using this extension with the above folder structure will yield a project called "src" with a root path folder1/folder2/src. This project references the folder corresponding to the root in order to include all C/C++ files. If header files are found outside the top-folder, they are not added in the references of the project.
CAST AIP Upgrade
When upgrading from CAST AIP 7.0.x to a compatible version (see section below), the java projects already discovered in CAST AIP 7.0.x and all previous configuration changes made in the CAST Management Studio will be preserved.
In order to respect this requirement and the project renaming conventions from v7.0.xx, the extension will remove any character from the project name that is not included in the following character set:
New in this release
The C and C++ File Discoverer 1.1.x brings the following update over previous releases:
- File extensions that are taken into account by the C and C++ File Discoverer are now taken directly from the CAST AIP language definition, rather than being hard coded in the discoverer itself.
- The following file extensions are now taken into account:
- C files: *.c, *.pc, *.ppc
- C++ files: *.cpp, *.cc, *.cxx
- NO project will be created when at least one Microsoft C/C++ .vcproj or .vcxproj project definition file definition is identified in any location under the root path (including recursive sub-folders).
CAST AIP release
|7.3.5 and all higher 7.3.x releases|
Download and installation instructions
- This extension contains a File discoverer and you should take note of the specific instructions in the installation guide that explains how to package your source code with the CAST Delivery Manager Tool when you have an existing Version.
- The latest release status of this extension can be seen when downloading it from the CAST Extend server.
The following screen shots show the differences in the product when the extension is installed:
- in the CAST Delivery Manager Tool, in the Package configuration tab, the interface contains a new item in the list of "Project types discovered":
- in the CAST Delivery Manager Tool, in the Package content tab, when the package contains some C/C++ files, the interface will display a new item in the list of "Project types discovered":
- in the CAST Delivery Manager Tool, in the Package configuration tab, you can define the various exclusion of projects with the "Filtering rules" and "Project exclusion" lists. However, since only one project is created, it's better to unselect the project type discovered rather than create exclusion lists.
- in the CAST Management Studio, when the delivery is accepted and set as current version, the package will contain Analysis Units corresponding to these projects:
- In the CAST Management Studio, the Analysis Units will contain:
- the Source Settings discovered by the extension:
- Sources: path corresponding to the top-folder
- the Source Settings discovered by the extension:
- the Analysis Settings are not discovered by the extension - you must define them at application level or at analysis unit level
Packaging your source code with the CAST Delivery Manager Tool
When you use the CAST Delivery Manager Tool to package the source code, please ensure that you tick the following option in the CAST Delivery Manager Tool to activate the extension:
- this option will be disabled (unticked) in all pre-existing packages - you need to check it before starting the packaging process otherwise it will be ignored.
- for new packages created after the extension's installation, the option will be enabled by default