This discoverer detects projects based on the presence of specific build compilation output files and their content. It can be used in conjunction with:
In what situation should you install this extension?
If your C/C++ source code is designed to compile on Linux, you can use a compilation logging tool called Scan Build (freely available from CAST - instructions included) while compiling the source code to output two files compile_commands.json and compile_config.json that will contain all the information necessary to compile your source code. These two Scan Build files should be delivered as input with your source code in the CAST Delivery Manager Tool: as long as you have also installed the CPP Compilation Database Discoverer, then the Scan Build output files will be taken into account when you package the source code and projects will be created based on what is found in the Scan Build files (compile_commands.json and compile_config.json).
CAST AIP compatibility
CAST AIP release
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.
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
The use of the discoverer will not result in a specific CPP Compilation Database Discoverer "project" - instead, based on what has been delivered in the Scan Build tool output files, projects may be identified (such as Visual Studio projects), or may not, in which case you will need to manually create an Analysis Unit for your analysis requirements.
Note also that:
- if your source code includes vcproj files and the Visual Studio C++ discoverers (embedded in the CAST Delivery Manager Tool) are active (ticked) as well as the CPP Compilation Database Discoverer, then you may need to carefully check the results of the packaging.
- you may need to create additional source code packages in the CAST Delivery Manager Tool to deliver the header folders
Errors during packaging
The directory 'xxx' used in commands inside the compile_config.json file is not matching the selected root 'yyy'
The following error may be visible following a packaging action when the CPP Compilation Database Discoverer is installed:
This error occurs if you are packaging the code (i.e. running the CAST Delivery Manager Tool) on a machine different from the one where the compilation took place and indicates that the commands found by the CAST Delivery Manager Tool in the compile_config.json file (output of the Scan Build tool) do not match the path defined in the Root Folder field.
The solution to this error is as follows:
- Either run the CAST Delivery Manager Tool on the machine on which the compilation took place
- Or, use the Development Root Folder option in the CAST Delivery Manager Tool to remap the paths: