On this page:
|Summary: Information and Release Notes about the CPP Compilation Database Discoverer for the CAST Delivery Manager Tool. This extension is a file discoverer.|
This discoverer detects projects based on the presence of specific build compilation output files and their content. It can be used in conjunction with:
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 release
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:
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:
The following error may be visible following a packaging action when the CPP Compilation Database Discoverer is installed:
The directory 'xxx' used in commands inside the compile_config.json file is not matching the selected root 'yyy'. The source code must be packaged in its development location or you should define a value for the Development root folder.
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: