There are multiple ways to specify the compiler to use, such as:
- Using the --cc command line option.
- Using the --cmake-cache command line option.
- Using a --cmake-define=CMAKE_C_COMPILER=xxx command line option.
- ...
Nonetheless, in the report.json file, the compiler pointed to by the
--cc command line option is reported, irrespective of the compiler
actually used by cmake during compilation.
This patch fixes that by getting the compiler used from the
CMakeCache.txt file rather than from the --cc command line option.