Get the unittests compiling when building with cmake and the setting
[oota-llvm.git] / utils / unittest / CMakeLists.txt
index 70ed35df2e6c18d10dd40892708ad81d0a89401c..8bdfee15c198e80bb6dbb901855004a4a8f118f9 100644 (file)
@@ -27,6 +27,10 @@ endif()
 set(LLVM_REQUIRES_RTTI 1)
 add_definitions( -DGTEST_HAS_RTTI=0 )
 
+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)