Skip to content

Commit

Permalink
[interpreter] Suppress STATUS messages from LLVM
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hahnjo committed Jan 17, 2025
1 parent e0040c5 commit 37f0cf9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,23 @@ 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)
else()
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."
Expand Down

0 comments on commit 37f0cf9

Please sign in to comment.