mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add 'Scan' WM_COMPILE_OPTION (clang only)
- backend settings for scan-build
This commit is contained in:
12
Allwmake-scan
Executable file
12
Allwmake-scan
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# Allwmake with scan-build (clang)
|
||||
|
||||
c_compiler="$(command -v $WM_CC)"
|
||||
cxx_compiler"$(command -v $WM_CXX)"
|
||||
|
||||
set -x
|
||||
|
||||
scan-build --use-cc="$c_compiler" --use-c++="$cxx_compiler" \
|
||||
./Allwmake "$@"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
7
wmake/rules/linux64Clang/c++Scan
Normal file
7
wmake/rules/linux64Clang/c++Scan
Normal file
@ -0,0 +1,7 @@
|
||||
# Static analyzer with clang and Opt.
|
||||
# Call top-level Allwmake with 'scan-build' and corresponding compiler
|
||||
|
||||
include $(DEFAULT_RULES)/c++Opt
|
||||
|
||||
cxx_compiler := $(shell which clang++)
|
||||
CC := $(shell echo "$(cxx_compiler)" | sed -e 's@/bin/[^/]*@/libexec/c++-analyzer@') -std=c++11 -m64
|
||||
7
wmake/rules/linux64Clang/cScan
Normal file
7
wmake/rules/linux64Clang/cScan
Normal file
@ -0,0 +1,7 @@
|
||||
# Static analyzer with clang and Opt.
|
||||
# Call top-level Allwmake with 'scan-build' and corresponding compiler
|
||||
|
||||
include $(DEFAULT_RULES)/cOpt
|
||||
|
||||
c_compiler := $(shell which clang)
|
||||
cc := $(shell echo "$(c_compiler)" | sed -e 's@/bin/[^/]*@/libexec/ccc-analyzer@') -m64
|
||||
Reference in New Issue
Block a user