Index: bolt/CMakeLists.txt =================================================================== --- bolt/CMakeLists.txt +++ bolt/CMakeLists.txt @@ -14,7 +14,7 @@ set(BOLT_LLD_EXE "" CACHE FILEPATH "Path to lld executable for the target \ architecture for use in BOLT tests") -set(BOLT_INCLUDE_TESTS OFF) +set(BOLT_INCLUDE_TESTS ON CACHE BOOL "Build BOLT tests") if (LLVM_INCLUDE_TESTS) if ("clang" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_CLANG_EXE) if ("clang" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_CLANG_EXE) @@ -26,16 +26,17 @@ message(WARNING "BOLT_LLD_EXE is set and lld project is enabled. \ BOLT_LLD_EXE will be used for BOLT tests.") endif() - set(BOLT_INCLUDE_TESTS ON) else() message(WARNING "Not including BOLT tests since lld is disabled. \ Enable lld in LLVM_ENABLE_PROJECTS or provide a path to lld binary \ in BOLT_LLD_EXE.") + set(BOLT_INCLUDE_TESTS OFF) endif() else() message(WARNING "Not including BOLT tests since clang is disabled. \ Enable clang in LLVM_ENABLE_PROJECTS or provide a path to clang \ binary in BOLT_CLANG_EXE.") + set(BOLT_INCLUDE_TESTS OFF) endif() endif()