diff --git a/CMakeLists.txt b/CMakeLists.txt index 86c6ab3a..9bb29017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,14 @@ if (ROOT_mathmore_FOUND) include(${ROOT_USE_FILE}) endif (ROOT_mathmore_FOUND) +#--- the next check is need to set a flag, since root 6.24 (minuit2) breaks +#--- the backwards compatibility. --------------------------------------------- +if (ROOT_VERSION VERSION_LESS "6.24") + set(ROOT_GRTEQ_24 0) +else () + set(ROOT_GRTEQ_24 1) +endif () + #--- check for boost ---------------------------------------------------------- find_package(Boost REQUIRED COMPONENTS @@ -156,7 +164,7 @@ if (qt_based_tools) # check for any Qt, i.e. AUTO if (qt_version STREQUAL AUTO) # try Qt6 - find_package(Qt6Core) + find_package(Qt6Core QUIET) if (Qt6Core_FOUND) find_package(Qt6Widgets CONFIG REQUIRED) find_package(Qt6Xml CONFIG REQUIRED) @@ -166,7 +174,7 @@ if (qt_based_tools) endif (Qt6Core_FOUND) # try Qt5 if (NOT Qt6Core_FOUND) - find_package(Qt5Core) + find_package(Qt5Core QUIET) if (Qt5Core_FOUND) find_package(Qt5Widgets CONFIG REQUIRED) find_package(Qt5Xml CONFIG REQUIRED) diff --git a/cmake/config.h.in b/cmake/config.h.in index e4287b93..a7ec8219 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -3,6 +3,9 @@ #define PACKAGE_VERSION "@PROJECT_VERSION@" #define ROOT_VERSION_USED "@ROOT_VERSION@" +// define to 1 if minor ROOT6 version is >= 24 +#define ROOT_GRTEQ_24 @ROOT_GRTEQ_24@ + // define to 1 if you have and it should be used #cmakedefine HAVE_ALLOCA_H 1 diff --git a/src/classes/PFitter.cpp b/src/classes/PFitter.cpp index 81f7d442..46e09f82 100644 --- a/src/classes/PFitter.cpp +++ b/src/classes/PFitter.cpp @@ -1964,7 +1964,11 @@ Bool_t PFitter::ExecutePrintLevel(UInt_t lineNo) return false; } +#ifdef ROOT_GRTEQ_24 + ROOT::Minuit2::MnPrint::SetGlobalLevel(fPrintLevel); +#else ROOT::Minuit2::MnPrint::SetLevel(fPrintLevel); +#endif // clean up if (tokens) {