Disable pthread support in googletest if llvm was configured without threads.
[oota-llvm.git] / utils / unittest / UnitTestMain / Makefile
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