From 37f0cf969ea2a962787b51f831f473518b5f631a Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Fri, 17 Jan 2025 09:13:58 +0100 Subject: [PATCH] [interpreter] Suppress STATUS messages from LLVM LLVM prints which projects and targets are enabled on every CMake invocation. This information is noise for most users of ROOT, so turn it off unless the user explicitly decided to see it. --- interpreter/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt index 419ff4028a0a7..162235343e66c 100644 --- a/interpreter/CMakeLists.txt +++ b/interpreter/CMakeLists.txt @@ -218,6 +218,12 @@ if(builtin_llvm) set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "") + #---Reduce log level to suppress STATUS messages from LLVM + if(NOT DEFINED CMAKE_MESSAGE_LOG_LEVEL) + set(CMAKE_MESSAGE_LOG_LEVEL "NOTICE") + set(_unset_log_level TRUE) + endif() + #---Add the sub-directory excluding all the targets from all----------------------------------------- if(CMAKE_GENERATOR MATCHES "Xcode") add_subdirectory(llvm-project/llvm) @@ -225,6 +231,10 @@ if(builtin_llvm) add_subdirectory(llvm-project/llvm EXCLUDE_FROM_ALL) endif() + if(DEFINED _unset_log_level) + unset(CMAKE_MESSAGE_LOG_LEVEL) + endif() + set(LLVM_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/interpreter/llvm-project/llvm/include ${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/include CACHE STRING "LLVM include directories."