tool: support static clang analyzer in build.mk

Issue #3022
This commit is contained in:
Alexander Boettcher 2018-10-25 18:33:16 +02:00 committed by Christian Helmuth
parent 918281b01f
commit 8199b3e685
1 changed files with 7 additions and 0 deletions

View File

@ -132,6 +132,13 @@ $(error "$(CUSTOM_CXX) version $(REQUIRED_GCC_VERSION) is required")
endif
endif
ifneq ($(STATIC_ANALYZE),)
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
$(call check_tool,scan-build)
MAKE := scan-build --use-c++=$(CUSTOM_CXX) --use-cc=$(CUSTOM_CC) $(MAKE)
endif
#
# Default rule: build all directories specified as make arguments
#