[Cogl] [PATCH] Fix building the conformance and unit tests on mingw32

Neil Roberts neil at linux.intel.com
Mon Sep 2 09:39:39 PDT 2013


The unit tests were failing to build with mingw32 because the
libtest-fixtures was being included both by libcogl and the
test-conformance and test-unit executables. That meant that the
symbols were defined twice and it wouldn't link.

The rule which depends on test-unit being built needs to be called
test-unit.exe on Windows so this patch fixes it to use the $(EXEEXT)
variable to get the right name.
---
 tests/conform/Makefile.am | 1 -
 tests/unit/Makefile.am    | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
index 585d304..8a0ffd8 100644
--- a/tests/conform/Makefile.am
+++ b/tests/conform/Makefile.am
@@ -141,7 +141,6 @@ test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
 test_conformance_LDADD = \
 	$(COGL_DEP_LIBS) \
 	$(top_builddir)/cogl/libcogl2.la \
-	$(top_builddir)/test-fixtures/libtest-fixtures.la \
 	$(LIBM)
 if !USE_GLIB
 test_conformance_LDADD += $(top_builddir)/deps/glib/libglib.la
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index 09bf9a3..d75cd0e 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -17,7 +17,7 @@ endif
 
 wrappers: stamp-test-unit
 	@true
-stamp-test-unit: Makefile test-unit
+stamp-test-unit: Makefile test-unit$(EXEEXT)
 	@mkdir -p wrappers
 	source $(top_builddir)/cogl/libcogl2.la ; \
 	  $(NM) $(top_builddir)/cogl/.libs/"$$dlname"| \
@@ -73,7 +73,6 @@ test_unit_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
 test_unit_LDADD = \
 	$(COGL_DEP_LIBS) \
 	$(top_builddir)/cogl/libcogl2.la \
-	$(top_builddir)/test-fixtures/libtest-fixtures.la \
 	$(LIBM)
 if !USE_GLIB
 test_unit_LDADD += $(top_builddir)/deps/glib/libglib.la
-- 
1.8.3.1



More information about the Cogl mailing list