Enable C++11 in 'make lint'

autotools implements C++11 support by setting $CXX to
"g++ -std=c++11", so we have to make sure to quote $CXX when
passing it to the linter script
This commit is contained in:
ridiculousfish 2016-11-20 01:42:03 -08:00
parent 3a03d5df53
commit c7a016a137
2 changed files with 3 additions and 3 deletions

View file

@ -870,9 +870,9 @@ depend: | show-MKDIR_P
# TODO - why not have the Makefile run lint.fish on actual files itself (generate a report target?)
#
lint:
$v build_tools/lint.fish $(CXX) $(CXXFLAGS) $(CPPFLAGS)
$v build_tools/lint.fish "$(CXX)" $(CXXFLAGS) $(CPPFLAGS)
lint-all:
$v build_tools/lint.fish $(CXX) --all $(CXXFLAGS) $(CPPFLAGS)
$v build_tools/lint.fish "$(CXX)" --all $(CXXFLAGS) $(CPPFLAGS)
.PHONY: lint lint-all
#

View file

@ -106,7 +106,7 @@ if set -q c_files[1]
set -l cm (set_color magenta)
set -l cbrm (set_color brmagenta)
set -l template "[$cb$cu{file}$cn$cb:{line}$cn] $cbrm{severity}$cm ({id}):$cn\n {message}"
set cppcheck_args -q --verbose --std=posix --language=c++ --template $template \
set cppcheck_args -q --verbose --std=c++11 --std=posix --language=c++ --template $template \
--suppress=missingIncludeSystem --inline-suppr --enable=$cppchecks \
--rule-file=.cppcheck.rules --suppressions-list=.cppcheck.suppressions $cppcheck_args