Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -846,7 +846,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. @@ -890,6 +889,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.