summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVassil Vassilev <v.g.vassilev@gmail.com>2017-06-09 16:37:39 +0000
committerVassil Vassilev <v.g.vassilev@gmail.com>2017-06-09 16:37:39 +0000
commit1fb874b24cd0bbc4d55b1407015e40ae82f36295 (patch)
tree59742fd5a2e8bb54c6dcf9f5bcc2d6df7512a724 /CMakeLists.txt
parentc65472c75feef22ce3c716aa14e24c5d3f2b3d51 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5b96569f9c6..1d9139a62c32 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -853,7 +853,6 @@ if( LLVM_INCLUDE_UTILS )
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 @@ if( LLVM_INCLUDE_TESTS )
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.