diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-06-03 15:17:04 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-06-03 15:17:04 +0000 |
commit | 2e3f44eab2cd1ade5316f0a2eb5e57d87119d89c (patch) | |
tree | 1b85be51ad4516ed7b324c6e8a391592a699c842 | |
parent | c72f8e9f9d5b7a9c1717428f02ba30ad3f401799 (diff) | |
download | external_llvm-2e3f44eab2cd1ade5316f0a2eb5e57d87119d89c.zip external_llvm-2e3f44eab2cd1ade5316f0a2eb5e57d87119d89c.tar.gz external_llvm-2e3f44eab2cd1ade5316f0a2eb5e57d87119d89c.tar.bz2 |
Disable pthread support in googletest if llvm was configured without threads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105390 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/Makefile.unittest | 5 | ||||
-rw-r--r-- | utils/unittest/UnitTestMain/Makefile | 5 | ||||
-rw-r--r-- | utils/unittest/googletest/Makefile | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index 6001c43..2a701a0 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -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) diff --git a/utils/unittest/UnitTestMain/Makefile b/utils/unittest/UnitTestMain/Makefile index 202ccb8..cec654f 100644 --- a/utils/unittest/UnitTestMain/Makefile +++ b/utils/unittest/UnitTestMain/Makefile @@ -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 diff --git a/utils/unittest/googletest/Makefile b/utils/unittest/googletest/Makefile index bfd35a4..21b29ff 100644 --- a/utils/unittest/googletest/Makefile +++ b/utils/unittest/googletest/Makefile @@ -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 |