mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
makefiles/scan-build: Produce an error when doing 'scan-build-analyze'
This makes doing 'scan-build-analyze' produce an error at execution if WERROR=1. When used from `scan-build` it will not procude an error to display the result webpage.
This commit is contained in:
parent
ea3c1661f3
commit
50f58bfb07
@ -34,11 +34,15 @@ SCANBUILD_ENV_VARS := \
|
||||
USER \
|
||||
#
|
||||
|
||||
# Produce errors by default at the end of compilation when warning are found
|
||||
SCANBUILD_ERROR ?= $(if $(filter 1,$(WERROR)),--status-bugs)
|
||||
|
||||
SCANBUILD_ARGS ?= \
|
||||
-analyze-headers \
|
||||
--use-cc=$(CC) \
|
||||
--use-c++=$(CXX) \
|
||||
-analyzer-config stable-report-filename=true \
|
||||
$(SCANBUILD_ERROR) \
|
||||
#
|
||||
|
||||
SCANBUILD_OUTPUTDIR = scan-build/$(BOARD)
|
||||
@ -63,6 +67,10 @@ else # INSIDE_DOCKER
|
||||
scan-build: ..scan-build-view
|
||||
endif # INSIDE_DOCKER
|
||||
|
||||
# Prevent 'analyze' from producing an error when doing 'scan-build' and
|
||||
# still show the webpage for interractive checking.
|
||||
scan-build: SCANBUILD_ERROR=
|
||||
|
||||
ifeq ($(BUILD_IN_DOCKER),1)
|
||||
# It will trigger executing 'scan-build' or 'scan-build-analyze' with docker
|
||||
scan-build-analyze: ..in-docker-container
|
||||
|
Loading…
Reference in New Issue
Block a user