summaryrefslogtreecommitdiff
path: root/cppunit
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-16 13:31:15 +0300
committerTor Lillqvist <tml@iki.fi>2013-04-16 13:31:59 +0300
commitbc88e110dd6908588d01c6ecad01fd3ecd8e0076 (patch)
tree35496362ee2394821a2ef2f7dd3d50de27a8c8b5 /cppunit
parent7c0585c86e4b904ae687f936b17aecb753f7a6d6 (diff)
Probably a good idea to use -D_GLIBCXX_FULLY_DYNAMIC_STRING here, too
While at it, do the CXXFLAGS dance on separate lines as appends to a variable for clarity, instead of in-line on the configure command line. Change-Id: I61843ae82efdf341c7e33d3f08d5715a14fa2f40
Diffstat (limited to 'cppunit')
-rw-r--r--cppunit/ExternalProject_cppunit.mk26
1 files changed, 24 insertions, 2 deletions
diff --git a/cppunit/ExternalProject_cppunit.mk b/cppunit/ExternalProject_cppunit.mk
index 1617ecdffca0..7aba4f078bcc 100644
--- a/cppunit/ExternalProject_cppunit.mk
+++ b/cppunit/ExternalProject_cppunit.mk
@@ -35,6 +35,29 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
,src/cppunit)
endif
else
+
+cppunit_CXXFLAGS=$(CXXFLAGS)
+
+ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX MACOSX NETBSD OPENBSD,$(OS)))
+ifneq (,$(gb_ENABLE_DBGUTIL))
+cppunit_CXXFLAGS+=-D_GLIBCXX_DEBUG
+endif
+endif
+
+ifeq ($(OS),MACOSX)
+ifneq (,$(gb_ENABLE_DBGUTIL))
+cppunit_CXXFLAGS+=-D_GLIBCXX_FULLY_DYNAMIC_STRING
+endif
+endif
+
+ifeq ($(OS)-$(COM),WNT-GCC)
+cppunit_CXXFLAGS+=-mthreads
+endif
+
+ifneq (,$(debug))
+cppunit_CXXFLAGS+=-g
+endif
+
$(call gb_ExternalProject_get_state_target,cppunit,build) :
$(call gb_ExternalProject_run,build,\
./configure \
@@ -48,8 +71,7 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
$(if $(filter WNT,$(OS)),LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
$(if $(filter SOLARIS,$(OS)),LIBS="-lm") \
$(if $(filter ANDROID,$(OS)),LIBS="-lgnustl_shared -lm") \
- CXXFLAGS="$(if $(filter GCC,$(COM)),$(if $(filter LINUX FREEBSD OPENBSD NETBSD DRAGONFLY ANDROID MACOSX,$(OS)),$(if $(filter TRUE,$(ENABLE_DBGUTIL)),-D_GLIBCXX_DEBUG),$(if $(filter WNT,$(OS)),-mthreads))) \
- $(if $(debug),-g)" \
+ CXXFLAGS="$(cppunit_CXXFLAGS)" \
&& cd src \
&& $(MAKE) \
)