Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -1141,6 +1141,9 @@ add_subdirectory(utils/UnicodeData) add_subdirectory(utils/yaml-bench) add_subdirectory(utils/split-file) + 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. @@ -1185,9 +1188,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