Page tree
Skip to end of metadata
Go to start of metadata

On this page:

Target audience:

CAST Administrators

Summary: Information about the C and C++ File Discoverer 1.1.x for the CAST Delivery Manager Tool. This extension is a file discoverer.

CAST recommends using the CPP Compilation Database Discoverer extension instead of the C and C++ File Discoverer where possible.

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:

Extension ID

com.castsoftware.dmtcfilediscoverer

What's new?

Please see: C and Cpp File Discoverer - 1.1 - Release Notes for more information.

Extension description

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).

Technical information

What does the extension identify - i.e. what does it consider as a "project" and therefore an Analysis Unit in the CAST Management Studio?

Only one project is created per package when C or C++ files are detected (i.e. one project is equal to one Analysis Unit) - the following are supported:

  • *.c, *.pc, *.ppc
  • *.cpp, *.cc, *.cxx

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):

root
-folder1
--folder2
---src
----folder3
-----file1.c
----folder4
-----file2.c
----folder5
-----file3.c
-----file4.cpp
---include
----file1.h
----file2.h

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.

Note that even if the extension is activated, NO project will be created when at least one Microsoft C/C++ .vcproj or .vcxproj project definition file is identified in any location under the root path (including recursive sub-folders).

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 compatibility

This extension is compatible with:

CAST AIP release
Supported
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.5 and all higher 7.3.x releases(tick)

Download and installation instructions

Please see: 

  • 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.

Extension interface

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.
Note: please ensure that you exclude projects that correspond to the same source code. If you have some Visual C++ discovered projects inside the same package, CAST recommends deactivating this discoverer.
  • 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 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:

Note that:

  • 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

  • No labels

12 Comments

  1. Anonymous

    Hi

    Could you tell me why this extension does not appear on the list in CAST 7.3.10?

    Pawel Woznicki OPL 

    1. Hi,

      Probably because it is an error. I will correct it.

  2. Anonymous

    Thanks for a quick reacion

    In fact I would need it very very much today (smile)

    Are you able to pass it other way? 

    Paweł

    1. I've added it (Supported Languages#Supportedbyanextension). However, I realise now why it was not documented previously: this extension is a pure file discoverer, so it does not provide support for the analysis of a technology that AIP does not support out of the box (for example like the PHP extension). AIP has always been able to analyze non-Microsoft C/C++, but you just have to manually add the Analysis Units in the CAST Management Studio. This extension does away with that need.

  3. Anonymous

    OK, But to deliver the sources via DMT I need this extension as nothing is detected in the delivery package

    1. If you have non-Microsoft Visual C/C++ source code projects, you can still deliver them with the DMT (in its "out of the box" state) but without the C/C++ File Extension installed, the DMT will not detect any of these non-MS projects. Therefore when you deploy the delivered source code in the CAST Management Studio no Analysis Units will be created for these types of projects. But the source code is still delivered and you can still analyze the non-Microsoft C/C++ source code: you just need to manually create the C/C++ Analysis Units in the CAST Management Studio and run an analysis as normal.

      The C/C++ file extension, when installed, will allow the DMT to detect non-Microsoft C/C++ projects and therefore when you deploy in the CAST Management Studio, the Analysis Units will be created for you.

       

  4. Anonymous

    James.

    I am afraid that I wrongly posted my first question. Or at least inacurately

    I meant that I don't have this C and Cpp File Discoverer 1.1.x on the list in Extension Downloader. Not in DMT

    Is there something what I can do? 

    1. I just checked, and it is there. You need to uncheck "Long term support":

      1. Anonymous

        I did check it. I don't have it in 8.0.1 and 7.3.10. How is it possible. (sad)

        1. I checked with 7.3.10 and you are correct  - I do not see it either. However, I do see it with 8.0.x.

          I will check with the Product Manager as it is possible the documentation is incorrect and it is only supported in 8.0.x and above.

          1. Anonymous

            OK I have found it on 8.0.1

          2. Anonymous

            James I have just placed the plugin from 

             

            C:\ProgramData\CAST\CAST\Extensions\com.castsoftware.dmtcfilediscoverer.1.1.0-funcrel\TOOLS\Plugins

            to my 7310 Delivery folder and it seems to be working (smile).

            Let me just finish the entire analysis with 6 make files