AVX-512: Added intrinsic for cvtph2ps.
[oota-llvm.git] / utils / unittest / CMakeLists.txt
index 9d678edfd12c6d5281e556002ab6bb8e36b83124..569af88d670be6229d6b349796d69b78bee00aee 100644 (file)
@@ -14,6 +14,7 @@
 # Where gtest's .h files can be found.
 include_directories(
   googletest/include
+  googletest
   )
 
 if(WIN32)
@@ -26,19 +27,19 @@ 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 )
+
+if (NOT LLVM_ENABLE_THREADS)
+  add_definitions( -DGTEST_HAS_PTHREAD=0 )
+endif()
+
+# Visual Studio 2012 only supports up to 8 template parameters in
+# std::tr1::tuple by default, but gtest requires 10
+if(MSVC AND MSVC_VERSION EQUAL 1700)
+  add_definitions(-D_VARIADIC_MAX=10)
+endif ()
 
 add_llvm_library(gtest
-  googletest/gtest.cc
-  googletest/gtest-death-test.cc
-  googletest/gtest-filepath.cc
-  googletest/gtest-port.cc
-  googletest/gtest-test-part.cc
-  googletest/gtest-typed-test.cc
+  googletest/src/gtest-all.cc
   )
 
-add_llvm_library(gtest_main
-  UnitTestMain/TestMain.cpp
-  )
+add_subdirectory(UnitTestMain)