Commit 01b2a68a authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

Set proper standard to cppcheck

parent 64a36f0b
......@@ -11,10 +11,12 @@ endif
ifeq ($(LANG_MODE),c)
COMPILER := $(CC)
FLAGS := C
STANDARD := c99
endif
ifeq ($(LANG_MODE),cpp)
COMPILER := $(CXX)
FLAGS := CXX
STANDARD=c++11
endif
# Build compiler flags
ifdef RELEASE
......@@ -35,8 +37,8 @@ endif
ifndef PLUGIN_PATH
PLUGIN_PATH := lib
endif
CFLAGS_ALL += $(CFLAGS) --std=gnu99 -pedantic -Wall -Wextra -fno-omit-frame-pointer -DOUTPUT_DIRECTORY=\"$(abspath $(O))\" -DSOURCE_DIRECTORY=\"$(abspath $(S))\" -DPAGE_SIZE=$(PAGE_SIZE) -DPREFIX=$(abspath $(O)) -DMAX_LOG_LEVEL=$(MAX_LOG_LEVEL) -DPLUGIN_PATH=\"$(PLUGIN_PATH)\" $(addprefix,-D,$(EXTRA_DEFINES))
CXXFLAGS_ALL += $(CXXFLAGS) $(CFLAGS) --std=gnu++11 -pedantic -Wall -Wextra -fno-omit-frame-pointer -DOUTPUT_DIRECTORY=\"$(abspath $(O))\" -DSOURCE_DIRECTORY=\"$(abspath $(S))\" -DPAGE_SIZE=$(PAGE_SIZE) -DPREFIX=$(abspath $(O)) -DMAX_LOG_LEVEL=$(MAX_LOG_LEVEL) -DPLUGIN_PATH=\"$(PLUGIN_PATH)\" $(addprefix,-D,$(EXTRA_DEFINES))
CFLAGS_ALL += $(CFLAGS) --std=$(STANDARD) -pedantic -Wall -Wextra -fno-omit-frame-pointer -DOUTPUT_DIRECTORY=\"$(abspath $(O))\" -DSOURCE_DIRECTORY=\"$(abspath $(S))\" -DPAGE_SIZE=$(PAGE_SIZE) -DPREFIX=$(abspath $(O)) -DMAX_LOG_LEVEL=$(MAX_LOG_LEVEL) -DPLUGIN_PATH=\"$(PLUGIN_PATH)\" $(addprefix,-D,$(EXTRA_DEFINES))
CXXFLAGS_ALL += $(CXXFLAGS) $(CFLAGS) --std=$(STANDARD) -pedantic -Wall -Wextra -fno-omit-frame-pointer -DOUTPUT_DIRECTORY=\"$(abspath $(O))\" -DSOURCE_DIRECTORY=\"$(abspath $(S))\" -DPAGE_SIZE=$(PAGE_SIZE) -DPREFIX=$(abspath $(O)) -DMAX_LOG_LEVEL=$(MAX_LOG_LEVEL) -DPLUGIN_PATH=\"$(PLUGIN_PATH)\" $(addprefix,-D,$(EXTRA_DEFINES))
LDFLAGS_ALL += $(LDFLAGS)
ifdef STATIC
......@@ -253,4 +255,4 @@ FORCE:
cppcheck-%: FORCE
$(M) CCPC $@
$(Q)cppcheck --enable=style --enable=warning --std=c99 --suppress=allocaCalled --suppress=obsoleteFunctionsalloca --template='{file}:{line},{severity},{id},{message}' --inline-suppr --error-exitcode=1 -q $(filter-out FORCE,$^)
$(Q)cppcheck --enable=style --enable=warning --std=$(STANDARD) --suppress=allocaCalled --suppress=obsoleteFunctionsalloca --template='{file}:{line},{severity},{id},{message}' --inline-suppr --error-exitcode=1 -q $(filter-out FORCE,$^)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment