C and C++


Mapping Compiler Names to Models

There are some cases in which CodeSonar will not automatically associate a compiler name with an appropriate model, even though an appropriate model exists. In these cases, you can specify the desired mapping as part of the build process.

CodeSonar recognizes many compiler names and automatically maps each to the appropriate compiler model, as shown in section Compilers Recognized by CodeSonar.

There are some cases in which CodeSonar will not automatically associate a compiler name with an appropriate model. There are two possibilities:

An appropriate model does not exist.
You may be able to use the customizable xcc compiler model. If not, you will need to create a custom compiler model.
An appropriate model exists, but CodeSonar doesn't automatically map the compiler name to that model.
This can occur if your compiler is similar to one of the existing models but its name either is not in the list of recognized compilers or is in the list but associated with a different model.

In either case, use the COMPILER_MODELS configuration file parameter to associate the compiler name with the appropriate model.

For example, to associate a compiler called mygcc with the gcc compiler model when building project myproj:

on Windows:
COMPILER_MODELS += mygcc.exe -> gcc
otherwise:
COMPILER_MODELS += mygcc -> gcc