Skip to content

Commit

Permalink
[CMake] no longer use find_package(ROOT) in QUIET mode
Browse files Browse the repository at this point in the history
This prevented any diagnostics for the user.
  • Loading branch information
KrisThielemans committed Dec 11, 2024
1 parent 3c78e21 commit 32cfb0b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cmake/FindCERN_ROOT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
## FINDING ROOT
#
# Attempts to `find_package(ROOT)`, If that fails, use root-config.
# The primary method for ROOT being found is to use the `find_package(ROOT ${CERN_ROOT_FIND_VERSION} QUIET)` call.
# This process utilizes the `ROOT_DIR` variable to find the relevant CMake files.
# The primary method for ROOT being found is to use the `find_package(ROOT ${CERN_ROOT_FIND_VERSION} CONFIG)` call.
# This process utilizes the `ROOT_DIR` variable to find the relevant ROOTConfig*.cmake files (which are
# part of the ROOT distribution).
# There are two methods by which this variable can be set:
# 1. Set the `ROOT_DIR` CMake argument. Point to `<ROOT_install_dir>/cmake` directory.
# 2. Use the `ROOTSYS` CMake or environment variable. If `ROOT_DIR` is not provided, we will determine set `ROOT_DIR` to `${ROOTSYS}/cmake`.
Expand Down Expand Up @@ -53,7 +54,7 @@ if (DEFINED ROOT_DIR)
endif()
endif()

find_package(ROOT ${CERN_ROOT_FIND_VERSION} QUIET)
find_package(ROOT ${CERN_ROOT_FIND_VERSION} CONFIG)
if (ROOT_FOUND)
if (CERN_ROOT_DEBUG)
message(STATUS "Found ROOTConfig.cmake, so translating to old CERN_ROOT variable names")
Expand Down

0 comments on commit 32cfb0b

Please sign in to comment.