LRsplines
LRsplines copied to clipboard
Add static analysis support
This adds clang support and static analysis support to the build system.
In general: You execute the tests by
ctest -C analyze|cppcheck|clang-check
analyze configuration executes both analyzers.
To enable the clang-check based tests, it is best to build with clang since the compatiblity with gcc is only 99% and clang-check uses the build command from the build system so all switches are passed. You also have to pass -DCMAKE_EXPORT_COMPILE_COMMANDS=1 when configuring.
cd Debug
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
make -j4
ctest -C analyze|cppcheck|clang-check
cd ..
ctest -C analyze|cppcheck|clang-check
does not run any tests.
I simply get the following error output
clang-check: command not found
uhm, it still works for me. you do realize that's a regexp style alternative list ?
ctest -C analyze
runs both analyzers,
ctest -C cppcheck
runs only cppcheck,
ctest -C clang-check
runs only clang-check.