From c1c633dbfae22a739dac55dc5bfec72019e05df5 Mon Sep 17 00:00:00 2001 From: Massimiliano Galli <massimiliano.galli@cern.ch> Date: Mon, 23 Mar 2020 14:11:46 +0100 Subject: [PATCH] [CMake][Exp PyROOT] Add useful config-time message regarding versions of Python used to build --- cmake/modules/SearchRootCoreDeps.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmake/modules/SearchRootCoreDeps.cmake b/cmake/modules/SearchRootCoreDeps.cmake index 57787cc948e..c110e4789ed 100644 --- a/cmake/modules/SearchRootCoreDeps.cmake +++ b/cmake/modules/SearchRootCoreDeps.cmake @@ -73,6 +73,15 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) message(FATAL_ERROR "No Python 2 or 3 were found") endif() + # Print message saying with which versions of Python are used to build + if(pyroot_experimental) + if(NOT Python3_Development_FOUND OR NOT Python2_Development_FOUND) + message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for version ${PYTHON_VERSION_MAJOR} ") + elseif(Python3_Development_FOUND AND Python2_Development_FOUND) + message(STATUS "Main Python used to build: ${PYTHON_VERSION_MAJOR}; PyROOT built for versions ${PYTHON_VERSION_MAJOR} and ${OTHER_PYTHON_VERSION_MAJOR}") + endif() + endif() + else() find_package(PythonInterp ${python_version} REQUIRED) -- GitLab