BUILD_LOG

This synchronization type allows you to add data using a build log. If your build system is able to generate a build log that abides by the following constraints:

  • The build log is newline-separated for each source file that was compiled.
  • The lines that contain a path to a source file also contain the Include paths and macro Definitions needed to compile the file.

then the resultant log file can be used to add the data to a Helix QAC project using the following command:

qacli sync -P <directory> --type BUILD_LOG <build-log-path>

If your build system does not support the creation of a build log in this format, then, for most IDEs and build systems, a log can be created by using a script that wraps your compiler. The following is an example using the Bash variant:

#!/bin/bash
echo "$@" >> build.log
exec /usr/bin/gcc "$@"

In this example, the script must be named ’gcc’, made executable, and placed on the PATH prior to ’gcc’. During the build process, the build system will call the wrapper script instead of ’gcc’ and a build log will be dropped in each directory from which the wrapper is executed. These build logs will now be suitable for using with the BUILD_LOG command. You just need to ensure that you use an absolute path for the ’directory’ argument and issue the command from the same directory as the one containing the log file.

The same method can be used for the Windows platform, using a Windows version of the above script example.