X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/05f64ca2e483709faa6bc69dfa79129d2d4c679e..b58e2c7c56b1416a343e81f9f80cb1f02c128e25:/test/libapt/makefile diff --git a/test/libapt/makefile b/test/libapt/makefile index 0f8df291f..5ff9cf68a 100644 --- a/test/libapt/makefile +++ b/test/libapt/makefile @@ -8,15 +8,15 @@ APT_DOMAIN=none include ../../buildlib/defaults.mak .PHONY: test -ifeq (file-okay,$(shell $(CC) -M gtest_runner.cc >/dev/null 2>&1 && echo 'file-okay')) +ifeq (file-okay,$(shell $(CC) -I $(BASE)/build/include -M gtest_runner.cc >/dev/null 2>&1 && echo 'file-okay')) test: $(BIN)/gtest$(BASENAME) MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=$(LIB) $(BIN)/gtest$(BASENAME) $(BIN)/gtest$(BASENAME): $(LIB)/gtest.a PROGRAM = gtest${BASENAME} -SLIBS = -lapt-pkg -lapt-private -pthread $(LIB)/gtest.a -LIB_MAKES = apt-pkg/makefile apt-private/makefile +SLIBS = -lapt-pkg -lapt-private -lapt-inst -pthread $(LIB)/gtest.a +LIB_MAKES = apt-pkg/makefile apt-private/makefile apt-inst/makefile SOURCE = gtest_runner.cc $(wildcard *-helpers.cc *_test.cc) include $(PROGRAM_H) @@ -33,7 +33,7 @@ GTEST_DIR = /usr/src/gtest # Flags passed to the preprocessor. # Set Google Test's header directory as a system directory, such that # the compiler doesn't generate warnings in Google Test headers. -CPPFLAGS += -isystem $(GTEST_DIR)/include +#CPPFLAGS += -isystem $(GTEST_DIR)/include # Flags passed to the C++ compiler. CXXFLAGS += -pthread @@ -41,6 +41,7 @@ CXXFLAGS += -pthread CXXFLAGS+= -Wno-missing-declarations CXXFLAGS+= -Wno-missing-field-initializers CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn +CXXFLAGS+= -Wno-undef # All Google Test headers. Usually you shouldn't change this definition. GTEST_HEADERS = /usr/include/gtest/*.h \ @@ -78,5 +79,6 @@ test: @echo "APT uses Googles C++ testing framework for its unit tests" @echo "On Debian systems this is available in the 'libgtest-dev' package." @echo "Please install it before attempting to run the unit tests." + $(CC) -I $(BASE)/build/include -M gtest_runner.cc exit 100 endif