Skip to content

Commit

Permalink
Makefile: fix fallthrough warnings with ccache
Browse files Browse the repository at this point in the history
It turns out that we're getting compile warnings with
arm-none-eabi-gcc 7.2.1 when used with ccache about implicit
fallthroughs. By setting CCACHE_CPP2 we force ccache to look at the
whole file not just the stripped version.
  • Loading branch information
julianoes committed Aug 29, 2019
1 parent e50dd7c commit b6de5ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ else
BUILD_DIR_SUFFIX :=
endif

# To prevent "// fallthrough" comments from being stripped by the preprocessor
# before ccache looks at the cache.
ifndef CCACHE_CPP2
export CCACHE_CPP2 = yes
endif

# additional config parameters passed to cmake
ifdef EXTERNAL_MODULES_LOCATION
CMAKE_ARGS += -DEXTERNAL_MODULES_LOCATION:STRING=$(EXTERNAL_MODULES_LOCATION)
Expand Down

0 comments on commit b6de5ed

Please sign in to comment.