From 48dd6685dbd912d6c412729a1d66e18a8ab08ff7 Mon Sep 17 00:00:00 2001 From: Oleksandr Zenaiev <oleksandr.zenaiev@cern.ch> Date: Wed, 23 Sep 2020 16:17:37 +0200 Subject: [PATCH] fix cmake compilation if cmake version <3 and ROOT version >=6.22.02 --- cmake/find_package_ROOT.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/find_package_ROOT.cmake b/cmake/find_package_ROOT.cmake index 6a40d2479..1257aecff 100644 --- a/cmake/find_package_ROOT.cmake +++ b/cmake/find_package_ROOT.cmake @@ -21,7 +21,9 @@ if(EXISTS ${root-config}) list(APPEND ROOT_HINTS ${ROOT_PREFIX}) endif() -find_package(ROOT QUIET HINTS ${ROOT_HINTS}) +if(NOT CMAKE_VERSION VERSION_LESS 3.0.0) + find_package(ROOT QUIET HINTS ${ROOT_HINTS}) +endif() if(ROOT_FOUND) #Use variables provided by ROOTConfig.cmake #Remove some extra flags from ROOT_DEFINITIONS -- GitLab