From 622220ea0db00bf74611389570f430c395d77105 Mon Sep 17 00:00:00 2001 From: Marco Clemencic <marco.clemencic@cern.ch> Date: Mon, 14 Feb 2022 13:56:04 +0100 Subject: [PATCH] Change where LHCB_UNUSED_SUBDIR_MESSAGE_TYPE is initialized so that it is possible to override locally the value with a regular variable (and same for LHCB_UNUSED_SOURCE_MESSAGE_TYPE) --- cmake/LHCbConfigUtils.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/LHCbConfigUtils.cmake b/cmake/LHCbConfigUtils.cmake index f6ef1b3a046..392d320d592 100644 --- a/cmake/LHCbConfigUtils.cmake +++ b/cmake/LHCbConfigUtils.cmake @@ -27,6 +27,11 @@ list(PREPEND CMAKE_MODULE_PATH ${LHCbConfigUtils_DIR}) find_package(PkgConfig) include(FindDataPackage) +set(LHCB_UNUSED_SUBDIR_MESSAGE_TYPE "WARNING" + CACHE STRING "Message type for detected unused subdirs") +set(LHCB_UNUSED_SOURCE_MESSAGE_TYPE "WARNING" + CACHE STRING "Message type for detected unused source files") + #[========================================================================[.rst: .. cmake:command:: lhcb_env @@ -290,8 +295,6 @@ macro(lhcb_finalize_configuration) gaudi_install(CMAKE lhcbproject.yml) endif() - set(LHCB_UNUSED_SUBDIR_MESSAGE_TYPE "WARNING" CACHE STRING "Message type for detected unused subdirs") - set(LHCB_UNUSED_SOURCE_MESSAGE_TYPE "WARNING" CACHE STRING "Message type for detected unused source files") # check that we actually build everything in the project # - check all subdirs are included get_property(added_subdirs DIRECTORY PROPERTY SUBDIRECTORIES) -- GitLab