I would like to use Clang's static analyzer for analyzing parallel code, i.e., code with needs MPI compiler wrappers. When configuring with CMake, however, I always get
$ scan-build cmake /path/to/source
-- Check for working CXX compiler: /usr/share/clang/scan-build/c++-analyzer
-- Check for working CXX compiler: /usr/share/clang/scan-build/c++-analyzer -- works
and the subsequent compilation (make
) fails with
/usr/include/some/header.hpp:56:17: fatal error: mpi.h: No such file or directory
#include "mpi.h"
How to properly use scan-build
here?