We do not need google test utils if we disabled LLVM_INCLUDE_TESTS

Fixes embedded uses of llvm where google testing framework is provided outside.

llvm-svn: 305088
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index a5b9656..1d9139a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -853,7 +853,6 @@
   add_subdirectory(utils/not)
   add_subdirectory(utils/llvm-lit)
   add_subdirectory(utils/yaml-bench)
-  add_subdirectory(utils/unittest)
 else()
   if ( LLVM_INCLUDE_TESTS )
     message(FATAL_ERROR "Including tests when not building utils will not work.
@@ -897,6 +896,10 @@
   endif()
   add_subdirectory(test)
   add_subdirectory(unittests)
+  if( LLVM_INCLUDE_UTILS )
+    add_subdirectory(utils/unittest)
+  endif()
+
   if (WIN32)
     # This utility is used to prevent crashing tests from calling Dr. Watson on
     # Windows.