commit b6d2d0c187054183d266da34ab0910cc15739c92
parent 1ed8bba8d142e8ac8382d346c0be4f8f3334f59f
Author: Kyle Milz <kyle@0x30.net>
Date: Thu, 4 Aug 2016 20:24:15 -0600
bin: add static analysis wrapper script
Diffstat:
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -38,6 +38,11 @@ if $(OS) = LINUX {
LINKLIBS on citrun-inst = -lstdc++ -lbsd ;
}
+if $(CITRUN_SA) {
+ CC = $(CC) ;
+ C++ = $(CXX) ;
+}
+
if $(CITRUN_COVERAGE) {
LIBEGCOV = /usr/local/lib/gcc/x86_64-unknown-openbsd6.0/4.9.3/libgcov.a ;
LINKLIBS on citrun-gl += $(LIBEGCOV) ;
diff --git a/bin/sa.sh b/bin/sa.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+
+export CITRUN_SA=1
+scan-build -o html --use-c++=eg++ jam -j4
diff --git a/src/Jamfile b/src/Jamfile
@@ -41,6 +41,7 @@ Stringize demo_vshader_glsl.h : demo_vshader.glsl ;
Stringize demo_fshader_glsl.h : demo_fshader.glsl ;
ObjectC++Flags $(GL_SRCS) : `pkg-config $(PKG_CONFIG_LIBS) --cflags` ;
+ObjectC++Flags $(GL_SRCS) : -I/usr/local/include ;
LINKLIBS on citrun-gl += `pkg-config $(PKG_CONFIG_LIBS) --libs` ;
LinkLibraries citrun-gl : libglyphy utils ;