diff options
author | Tanya Lattner <tonic@nondot.org> | 2010-03-30 23:03:09 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2010-03-30 23:03:09 +0000 |
commit | dd99d9b297992119d8a4be331b33a23e107f5d2d (patch) | |
tree | 09f8a63ab21073c901744a673cdee523264cd187 | |
parent | dd77fb6ec08d9e372390320abef229a1585a0e7b (diff) | |
download | llvm-dd99d9b297992119d8a4be331b33a23e107f5d2d.tar.gz |
Merge 98074 from mainline. Fix for PR5893.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99956 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | unittests/Makefile.unittest | 18 | ||||
-rw-r--r-- | utils/unittest/googletest/Makefile | 9 |
2 files changed, 19 insertions, 8 deletions
diff --git a/unittests/Makefile.unittest b/unittests/Makefile.unittest index b1c1d2c6b140..8fbcfd2fb157 100644 --- a/unittests/Makefile.unittest +++ b/unittests/Makefile.unittest @@ -14,18 +14,20 @@ # Set up variables for building a unit test. ifdef TESTNAME -CPP.Flags += -DGTEST_HAS_RTTI=0 -# gcc's TR1 <tuple> header depends on RTTI, so force googletest to use -# its own tuple implementation. When we import googletest >=1.4.0, we -# can drop this line. -CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 - include $(LEVEL)/Makefile.common LLVMUnitTestExe = $(BuildMode)/$(TESTNAME)Tests$(EXEEXT) -CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/ -CPP.Flags += $(NO_VARIADIC_MACROS) +# Note that these flags are duplicated when building GoogleTest itself in +# utils/unittest/googletest/Makefile; ensure that any changes are made to both. +CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include +CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) +CPP.Flags += -DGTEST_HAS_RTTI=0 +# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not +# supported by Clang, so force googletest to use its own tuple implementation. +# When we import googletest >=1.4.0, we can drop this line. +CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 + TESTLIBS = -lGoogleTest -lUnitTestMain ifeq ($(ENABLE_SHARED), 1) diff --git a/utils/unittest/googletest/Makefile b/utils/unittest/googletest/Makefile index 15bbf4e69eaa..688a5bda812b 100644 --- a/utils/unittest/googletest/Makefile +++ b/utils/unittest/googletest/Makefile @@ -14,8 +14,17 @@ include $(LEVEL)/Makefile.config LIBRARYNAME = GoogleTest BUILD_ARCHIVE = 1 REQUIRES_RTTI = 1 + +# Note that these flags are duplicated when building individual tests in +# unittests/Makefile.unittest; ensure that any changes are made to both. CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include CPP.Flags += $(NO_MISSING_FIELD_INITIALIZERS) $(NO_VARIADIC_MACROS) +CPP.Flags += -DGTEST_HAS_RTTI=0 +# libstdc++'s TR1 <tuple> header depends on RTTI and uses C++'0x features not +# supported by Clang, so force googletest to use its own tuple implementation. +# When we import googletest >=1.4.0, we can drop this line. +CPP.Flags += -DGTEST_HAS_TR1_TUPLE=0 + ifeq ($(HOST_OS),MingW) CPP.Flags += -DGTEST_OS_WINDOWS=1 |