Disable pthread support in googletest if llvm was configured without threads.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 3 Jun 2010 15:17:04 +0000 (15:17 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 3 Jun 2010 15:17:04 +0000 (15:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105390 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Makefile.unittest
utils/unittest/UnitTestMain/Makefile
utils/unittest/googletest/Makefile

index 6001c436e5ae91c2a8e2a1ff7f6054c41326987c..2a701a019d8b052c3b78b8d74243ee9a0fcf24e2 100644 (file)
@@ -27,6 +27,11 @@ CPP.Flags += -DGTEST_HAS_RTTI=0
 # supported by Clang, so force googletest to use its own tuple implementation.
 CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
 
+# Disable pthreads if LLVM was configured without them.
+ifneq ($(HAVE_PTHREAD), 1)
+  CPP.Flags += -DGTEST_HAS_PTHREAD=0
+endif
+
 TESTLIBS = -lGoogleTest -lUnitTestMain
 
 ifeq ($(ENABLE_SHARED), 1)
index 202ccb8eeedc9f2c36fab1d95e8f1fb8c154b6fa..cec654f73afcc529cb5a859cf2640b6751fd8406 100644 (file)
@@ -22,4 +22,9 @@ CPP.Flags += -DGTEST_HAS_RTTI=0
 # supported by Clang, so force googletest to use its own tuple implementation.
 CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
 
+# Disable pthreads if LLVM was configured without them.
+ifneq ($(HAVE_PTHREAD), 1)
+  CPP.Flags += -DGTEST_HAS_PTHREAD=0
+endif
+
 include $(LEVEL)/Makefile.common
index bfd35a4f510037e6fa8061a7a82a59e6ba369dff..21b29ffc2c3a8659d7cd10840321c17b5faed639 100644 (file)
@@ -25,6 +25,11 @@ CPP.Flags += -DGTEST_HAS_RTTI=0
 # supported by Clang, so force googletest to use its own tuple implementation.
 CPP.Flags += -DGTEST_USE_OWN_TR1_TUPLE
 
+# Disable pthreads if LLVM was configured without them.
+ifneq ($(HAVE_PTHREAD), 1)
+  CPP.Flags += -DGTEST_HAS_PTHREAD=0
+endif
+
 ifeq ($(HOST_OS),MingW)
   CPP.Flags += -DGTEST_OS_WINDOWS=1
 endif