From 20bd625dc20bbbd23b358c0f05ad4f85d002abf8 Mon Sep 17 00:00:00 2001 From: Baruch Even Date: Sun, 3 Aug 2014 22:18:08 +0300 Subject: [PATCH] Fix build Renamed gtest/include to gtest/gtest since that's what the include files expected. Adjusted the Makefile to work through it all. --- .gitignore | 1 + Makefile | 13 ++++++++----- gtest/{include => gtest}/gtest-death-test.h | 0 gtest/{include => gtest}/gtest-message.h | 0 gtest/{include => gtest}/gtest-param-test.h | 0 gtest/{include => gtest}/gtest-param-test.h.pump | 0 gtest/{include => gtest}/gtest-printers.h | 0 gtest/{include => gtest}/gtest-spi.h | 0 gtest/{include => gtest}/gtest-test-part.h | 0 gtest/{include => gtest}/gtest-typed-test.h | 0 gtest/{include => gtest}/gtest.h | 0 gtest/{include => gtest}/gtest_pred_impl.h | 0 gtest/{include => gtest}/gtest_prod.h | 0 .../internal/gtest-death-test-internal.h | 0 gtest/{include => gtest}/internal/gtest-filepath.h | 0 gtest/{include => gtest}/internal/gtest-internal.h | 0 .../{include => gtest}/internal/gtest-linked_ptr.h | 0 .../internal/gtest-param-util-generated.h | 0 .../internal/gtest-param-util-generated.h.pump | 0 .../{include => gtest}/internal/gtest-param-util.h | 0 gtest/{include => gtest}/internal/gtest-port.h | 0 gtest/{include => gtest}/internal/gtest-string.h | 0 gtest/{include => gtest}/internal/gtest-tuple.h | 0 .../{include => gtest}/internal/gtest-tuple.h.pump | 0 gtest/{include => gtest}/internal/gtest-type-util.h | 0 .../internal/gtest-type-util.h.pump | 0 26 files changed, 9 insertions(+), 5 deletions(-) rename gtest/{include => gtest}/gtest-death-test.h (100%) rename gtest/{include => gtest}/gtest-message.h (100%) rename gtest/{include => gtest}/gtest-param-test.h (100%) rename gtest/{include => gtest}/gtest-param-test.h.pump (100%) rename gtest/{include => gtest}/gtest-printers.h (100%) rename gtest/{include => gtest}/gtest-spi.h (100%) rename gtest/{include => gtest}/gtest-test-part.h (100%) rename gtest/{include => gtest}/gtest-typed-test.h (100%) rename gtest/{include => gtest}/gtest.h (100%) rename gtest/{include => gtest}/gtest_pred_impl.h (100%) rename gtest/{include => gtest}/gtest_prod.h (100%) rename gtest/{include => gtest}/internal/gtest-death-test-internal.h (100%) rename gtest/{include => gtest}/internal/gtest-filepath.h (100%) rename gtest/{include => gtest}/internal/gtest-internal.h (100%) rename gtest/{include => gtest}/internal/gtest-linked_ptr.h (100%) rename gtest/{include => gtest}/internal/gtest-param-util-generated.h (100%) rename gtest/{include => gtest}/internal/gtest-param-util-generated.h.pump (100%) rename gtest/{include => gtest}/internal/gtest-param-util.h (100%) rename gtest/{include => gtest}/internal/gtest-port.h (100%) rename gtest/{include => gtest}/internal/gtest-string.h (100%) rename gtest/{include => gtest}/internal/gtest-tuple.h (100%) rename gtest/{include => gtest}/internal/gtest-tuple.h.pump (100%) rename gtest/{include => gtest}/internal/gtest-type-util.h (100%) rename gtest/{include => gtest}/internal/gtest-type-util.h.pump (100%) diff --git a/.gitignore b/.gitignore index 5e1f3fb..9bfa36b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /capn-test /capnpc-c /capn.a +/gtest-all.a .cproject .project .settings diff --git a/Makefile b/Makefile index 1e90bca..3733027 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ prefix = /usr all: capn.a capn.so capnpc-c test clean: - rm -f *.o *.so capnpc-c compiler/*.o + rm -f *.o *.so capnpc-c compiler/*.o *.a gtest/src/*.o %.o: %.c *.h *.inc compiler/*.h $(CC) $(CFLAGS) -c $< -o $@ @@ -26,12 +26,15 @@ test: capn-test ./capn-test %-test.o: %-test.cpp *.h *.c *.inc - $(CXX) --std=c++11 -g -I. -Igtest/include -o $@ -c $< + $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -gtest-all.o: gtest/src/*.cc - $(CXX) --std=c++11 -g -I. -Igtest/include -Igtest -o $@ -c $< +gtest/src/%.o: gtest/src/%.cc gtest/src/*.h + $(CXX) --std=c++11 -g -I. -Igtest -o $@ -c $< -capn-test: capn-test.o capn-stream-test.o compiler/test.capnp.o compiler/schema-test.o compiler/schema.capnp.o capn.a gtest-all.o -lpthread +gtest-all.a: $(patsubst %.cc,%.o,$(wildcard gtest/src/*.cc)) + $(AR) rcs $@ $^ + +capn-test: capn-test.o capn-stream-test.o compiler/test.capnp.o compiler/schema-test.o compiler/schema.capnp.o capn.a gtest-all.a -lpthread $(CXX) -std=c++11 -g -I. -o $@ $^ install: diff --git a/gtest/include/gtest-death-test.h b/gtest/gtest/gtest-death-test.h similarity index 100% rename from gtest/include/gtest-death-test.h rename to gtest/gtest/gtest-death-test.h diff --git a/gtest/include/gtest-message.h b/gtest/gtest/gtest-message.h similarity index 100% rename from gtest/include/gtest-message.h rename to gtest/gtest/gtest-message.h diff --git a/gtest/include/gtest-param-test.h b/gtest/gtest/gtest-param-test.h similarity index 100% rename from gtest/include/gtest-param-test.h rename to gtest/gtest/gtest-param-test.h diff --git a/gtest/include/gtest-param-test.h.pump b/gtest/gtest/gtest-param-test.h.pump similarity index 100% rename from gtest/include/gtest-param-test.h.pump rename to gtest/gtest/gtest-param-test.h.pump diff --git a/gtest/include/gtest-printers.h b/gtest/gtest/gtest-printers.h similarity index 100% rename from gtest/include/gtest-printers.h rename to gtest/gtest/gtest-printers.h diff --git a/gtest/include/gtest-spi.h b/gtest/gtest/gtest-spi.h similarity index 100% rename from gtest/include/gtest-spi.h rename to gtest/gtest/gtest-spi.h diff --git a/gtest/include/gtest-test-part.h b/gtest/gtest/gtest-test-part.h similarity index 100% rename from gtest/include/gtest-test-part.h rename to gtest/gtest/gtest-test-part.h diff --git a/gtest/include/gtest-typed-test.h b/gtest/gtest/gtest-typed-test.h similarity index 100% rename from gtest/include/gtest-typed-test.h rename to gtest/gtest/gtest-typed-test.h diff --git a/gtest/include/gtest.h b/gtest/gtest/gtest.h similarity index 100% rename from gtest/include/gtest.h rename to gtest/gtest/gtest.h diff --git a/gtest/include/gtest_pred_impl.h b/gtest/gtest/gtest_pred_impl.h similarity index 100% rename from gtest/include/gtest_pred_impl.h rename to gtest/gtest/gtest_pred_impl.h diff --git a/gtest/include/gtest_prod.h b/gtest/gtest/gtest_prod.h similarity index 100% rename from gtest/include/gtest_prod.h rename to gtest/gtest/gtest_prod.h diff --git a/gtest/include/internal/gtest-death-test-internal.h b/gtest/gtest/internal/gtest-death-test-internal.h similarity index 100% rename from gtest/include/internal/gtest-death-test-internal.h rename to gtest/gtest/internal/gtest-death-test-internal.h diff --git a/gtest/include/internal/gtest-filepath.h b/gtest/gtest/internal/gtest-filepath.h similarity index 100% rename from gtest/include/internal/gtest-filepath.h rename to gtest/gtest/internal/gtest-filepath.h diff --git a/gtest/include/internal/gtest-internal.h b/gtest/gtest/internal/gtest-internal.h similarity index 100% rename from gtest/include/internal/gtest-internal.h rename to gtest/gtest/internal/gtest-internal.h diff --git a/gtest/include/internal/gtest-linked_ptr.h b/gtest/gtest/internal/gtest-linked_ptr.h similarity index 100% rename from gtest/include/internal/gtest-linked_ptr.h rename to gtest/gtest/internal/gtest-linked_ptr.h diff --git a/gtest/include/internal/gtest-param-util-generated.h b/gtest/gtest/internal/gtest-param-util-generated.h similarity index 100% rename from gtest/include/internal/gtest-param-util-generated.h rename to gtest/gtest/internal/gtest-param-util-generated.h diff --git a/gtest/include/internal/gtest-param-util-generated.h.pump b/gtest/gtest/internal/gtest-param-util-generated.h.pump similarity index 100% rename from gtest/include/internal/gtest-param-util-generated.h.pump rename to gtest/gtest/internal/gtest-param-util-generated.h.pump diff --git a/gtest/include/internal/gtest-param-util.h b/gtest/gtest/internal/gtest-param-util.h similarity index 100% rename from gtest/include/internal/gtest-param-util.h rename to gtest/gtest/internal/gtest-param-util.h diff --git a/gtest/include/internal/gtest-port.h b/gtest/gtest/internal/gtest-port.h similarity index 100% rename from gtest/include/internal/gtest-port.h rename to gtest/gtest/internal/gtest-port.h diff --git a/gtest/include/internal/gtest-string.h b/gtest/gtest/internal/gtest-string.h similarity index 100% rename from gtest/include/internal/gtest-string.h rename to gtest/gtest/internal/gtest-string.h diff --git a/gtest/include/internal/gtest-tuple.h b/gtest/gtest/internal/gtest-tuple.h similarity index 100% rename from gtest/include/internal/gtest-tuple.h rename to gtest/gtest/internal/gtest-tuple.h diff --git a/gtest/include/internal/gtest-tuple.h.pump b/gtest/gtest/internal/gtest-tuple.h.pump similarity index 100% rename from gtest/include/internal/gtest-tuple.h.pump rename to gtest/gtest/internal/gtest-tuple.h.pump diff --git a/gtest/include/internal/gtest-type-util.h b/gtest/gtest/internal/gtest-type-util.h similarity index 100% rename from gtest/include/internal/gtest-type-util.h rename to gtest/gtest/internal/gtest-type-util.h diff --git a/gtest/include/internal/gtest-type-util.h.pump b/gtest/gtest/internal/gtest-type-util.h.pump similarity index 100% rename from gtest/include/internal/gtest-type-util.h.pump rename to gtest/gtest/internal/gtest-type-util.h.pump