diff --git a/flight/make/unittest.mk b/flight/make/unittest.mk index b967119a6..861d3ebf1 100644 --- a/flight/make/unittest.mk +++ b/flight/make/unittest.mk @@ -39,6 +39,9 @@ ALLOBJ := $(addprefix $(OUTDIR)/, $(addsuffix .o, $(ALLSRCBASE))) $(foreach src,$(ALLSRC),$(eval $(call COMPILE_C_TEMPLATE,$(src)))) $(foreach src,$(ALLCPPSRC),$(eval $(call COMPILE_CXX_TEMPLATE,$(src)))) +# Specific extensions to CPPFLAGS only for the google test library +$(OUTDIR)/gtest-all.o: CPPFLAGS += -I$(GTEST_SRC_DIR)/.. + $(eval $(call COMPILE_CXX_TEMPLATE, $(GTEST_SRC_DIR)/gtest-all.cc)) $(eval $(call LINK_CXX_TEMPLATE,$(OUTDIR)/$(TARGET).elf,$(ALLOBJ) $(OUTDIR)/gtest-all.o)) @@ -46,7 +49,7 @@ $(eval $(call LINK_CXX_TEMPLATE,$(OUTDIR)/$(TARGET).elf,$(ALLOBJ) $(OUTDIR)/gtes CPPFLAGS += -I$(GTEST_DIR)/include # Flags passed to the C++ compiler -CXXFLAGS += -g -Wall -Wextra +CXXFLAGS += -g -Wall -Wextra -Wno-missing-field-initializers # Flags passed to the C compiler CONLYFLAGS += -std=gnu99 diff --git a/make/tools.mk b/make/tools.mk index f7cceeddb..714de682c 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -120,7 +120,7 @@ else ifeq ($(UNAME), Windows) DOXYGEN_URL := http://librepilot.github.io/tools/doxygen-1.8.3.1-windows.tar.bz2 endif -GTEST_URL := http://librepilot.github.io/tools/gtest-1.6.0.zip +GTEST_URL := http://librepilot.github.io/tools/gtest-1.7.0.zip CCACHE_URL := http://samba.org/ftp/ccache/ccache-3.2.2.tar.bz2 CCACHE_MD5_URL := http://librepilot.github.io/tools/ccache-3.2.2.tar.bz2.md5 @@ -128,7 +128,7 @@ QT_VERSION := 5.5.1 QT_SDK_DIR := $(TOOLS_DIR)/qt-$(QT_VERSION) UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60 DOXYGEN_DIR := $(TOOLS_DIR)/doxygen-1.8.3.1 -GTEST_DIR := $(TOOLS_DIR)/gtest-1.6.0 +GTEST_DIR := $(TOOLS_DIR)/gtest-1.7.0 CCACHE_DIR := $(TOOLS_DIR)/ccache OSG_TOOLS_DIR := $(TOOLS_DIR)