Compile ws4d-gsoap with clang

 Clang is a new compiler based on  llvm that offers nice code analyzers to find bugs in C code. This page explains how to use the  clang analyzer tool to analyze ws4d-gsoaps code.

Set up clang build configuration

$ mkdir Build-Debug-Clang
$ mkdir Install-Debug-Clang
$ mkdir scanbuild-report

Configure cmake to use ccc-analyzer as compiler:

$ cd Build-Debug-Clang
$ CC=[path to]/ccc-analyzer ccmake ../

ccc-analyzer is located in /usr/share/clang/scan-build/ on ubuntu linux.

Run make within the scan-build tool:

$ make clean
$ scan-build -o [path to]/scanbuild-report make VERBOSE=1 install
[...]
scan-build: 4 bugs found.
scan-build: Run 'scan-view [path to]/scanbuild-report/2011-06-21-2' to examine bug reports.
$ scan-view [path to]/scanbuild-report/[buildid]
Starting scan-view at: http://127.0.0.1:8181
  Use Ctrl-C to exit.