Format of the build specification file for C/C++ projects
The Klocwork build specification for C/C++ projects, called kwinject.out by default, is a text file in semicolon-separated format. The first field is a tag to identify the type of line. The possible tags are as follows:
version lineThe version line is used to define the build specification format version. It must be the first line in the build specification. Only one version line may appear in a build specification. Example version line:
version;108 The three-digit integer is used to encode the version. The first (left-most) digit encodes the major version ("1" in above example); the last two digits encode the minor version ("08" in above example, resulting in the "1.8" full version code). Version 1.4 or later indicates that the build specification was generated using a source encoding of UTF-8, allowing multibyte characters (for example, Japanese). To ensure that kwbuildproject processes the build specification with UTF-8 encoding, the version must be version;104 or later.
compile lineCompile lines are used to track compiler execution. Example compile line:
compile;/tmp/zlib-1.2.2;/usr/bin/gcc;/tmp/zlib-1.2.2/example.o;example.c;-DUSE_MMAP The fields are:
link linesLink lines are used to track linker execution, that is, how executables/libraries are created. Example link line:
link;/tmp/zlib-1.2.2;/tmp/zlib-1.2.2/example;/tmp/zlib-1.2.2/example.o;/tmp/zlib-1.2.2/libz.a The fields are:
config lineThe config line is used to record the list of defines and include directories implicitly used by the native compiler. This line is optional, but in order to obtain an accurate analysis, system defines and includes must be specified. Example config line (truncated):
config;/usr/bin/gcc;-e;gnu;-DGNUC=3;...;-J/usr/include;... The fields are:
|