[build] tweak includes for test targets
This commit is contained in:
parent
0586e53d21
commit
0a8d7fdb89
@ -185,6 +185,7 @@ INSTALL_DATA = $(INSTALL) -p -m 644
|
||||
|
||||
ifeq ("@TESTING@", "yes")
|
||||
TEST_INCLUDES=\
|
||||
-I$(TOP_DIR) \
|
||||
-Igoogletest/googlemock/include \
|
||||
-Igoogletest/googletest/include
|
||||
else
|
||||
|
@ -78,9 +78,9 @@ TEST_OBJECTS=$(subst .cc,.gmo,$(TEST_SOURCE))
|
||||
|
||||
%.gmo: %.cc
|
||||
@echo " [CXX] $<"
|
||||
$(V) $(CXX) -c $(CPPFLAGS) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) -o $@ $<
|
||||
$(V) $(CXX) -c $(TEST_INCLUDES) $(CPPFLAGS) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) -o $@ $<
|
||||
@echo " [DEP] $<"
|
||||
$(V) $(CXX) -MM -MT $(subst .cc,.o,$<) $(CPPFLAGS) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) $< > $*.$$$$; \
|
||||
$(V) $(CXX) -MM -MT $(subst .cc,.o,$<) $(TEST_INCLUDES) $(CPPFLAGS) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) $< > $*.$$$$; \
|
||||
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
|
||||
$(RM) $*.$$$$
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user