diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -956,6 +956,9 @@ add_subdirectory(utils/count) add_subdirectory(utils/not) add_subdirectory(utils/yaml-bench) + if( LLVM_INCLUDE_TESTS ) + add_subdirectory(utils/unittest) + endif() else() if ( LLVM_INCLUDE_TESTS ) message(FATAL_ERROR "Including tests when not building utils will not work. @@ -1000,9 +1003,6 @@ add_subdirectory(utils/lit) 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