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

Set proper standard to cppcheck

parent 64a36f0b
...@@ -11,10 +11,12 @@ endif ...@@ -11,10 +11,12 @@ endif
ifeq ($(LANG_MODE),c) ifeq ($(LANG_MODE),c)
COMPILER := $(CC) COMPILER := $(CC)
FLAGS := C FLAGS := C
STANDARD := c99
endif endif
ifeq ($(LANG_MODE),cpp) ifeq ($(LANG_MODE),cpp)
COMPILER := $(CXX) COMPILER := $(CXX)
FLAGS := CXX FLAGS := CXX
STANDARD=c++11
endif endif
# Build compiler flags # Build compiler flags
ifdef RELEASE ifdef RELEASE
...@@ -35,8 +37,8 @@ endif ...@@ -35,8 +37,8 @@ endif
ifndef PLUGIN_PATH ifndef PLUGIN_PATH
PLUGIN_PATH := lib PLUGIN_PATH := lib
endif 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)) 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=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)) 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) LDFLAGS_ALL += $(LDFLAGS)
ifdef STATIC ifdef STATIC
...@@ -253,4 +255,4 @@ FORCE: ...@@ -253,4 +255,4 @@ FORCE:
cppcheck-%: FORCE cppcheck-%: FORCE
$(M) CCPC $@ $(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