aboutsummaryrefslogtreecommitdiff
path: root/utils/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'utils/unittest')
-rw-r--r--utils/unittest/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt
index 4400b38234..9d678edfd1 100644
--- a/utils/unittest/CMakeLists.txt
+++ b/utils/unittest/CMakeLists.txt
@@ -24,6 +24,12 @@ if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
add_definitions("-Wno-variadic-macros")
endif()
+set(LLVM_REQUIRES_RTTI 1)
+add_definitions( -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.
+add_definitions( -DGTEST_USE_OWN_TR1_TUPLE )
+
add_llvm_library(gtest
googletest/gtest.cc
googletest/gtest-death-test.cc