From 7c325e0bbad3b15878d7781ead0bea0e2e41d4aa Mon Sep 17 00:00:00 2001 From: agrigora Date: Fri, 23 Jan 2015 15:42:26 +0100 Subject: [PATCH] CMake: Moving FindROOT after the enabling of DA to enable RootExtra FindROOT position matters, it has to be after the enabling of the DAs in order to build the static library RootExtra --- CMakeLists.txt | 60 +++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1e4b1af1a2..bf9e2c1ab31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,21 +60,6 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) set(CMAKE_SHARED_LIBRARY_SUFFIX .so) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) -# ROOT configuration mandatory -if(ROOTSYS) - find_package(ROOT REQUIRED) - - # ROOT must be build with XML2 support - if(NOT ROOT_HASXML) - message(FATAL_ERROR "ROOT was not build with xml2 support. Please reinstall or rebuild ROOT with xml2 support") - endif(NOT ROOT_HASXML) -else() - message(FATAL_ERROR "ROOT installation not found!\nPlease point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR") -endif(ROOTSYS) - -# ROOT dictionaries and maps -include(CMakeALICE) - # Checking first for DIM, DATE, AMORE and daqDA # in case ROOT Extra static library needs to be enabled @@ -142,6 +127,24 @@ if(MDCRPM) message(STATUS "AliMDC RPM enabled. AliRoot static build enabled") endif(MDCRPM) +# ROOT configuration mandatory +# FindRoot has to be after the enabling of DA due to libRootExtra +# Do not put it above DA +if(ROOTSYS) + find_package(ROOT REQUIRED) + + # ROOT must be build with XML2 support + if(NOT ROOT_HASXML) + message(FATAL_ERROR "ROOT was not build with xml2 support. Please reinstall or rebuild ROOT with xml2 support") + endif(NOT ROOT_HASXML) +else() + message(FATAL_ERROR "ROOT installation not found!\nPlease point to the ROOT installation using -DROOTSYS=ROOT_INSTALL_DIR") +endif(ROOTSYS) + +# ROOT dictionaries and maps +include(CMakeALICE) + + # If no Fortran, i.e on Windows # We need to specify ROOT fortran # (f95 comes before gfortran in default module) @@ -170,33 +173,6 @@ else() message(STATUS "Doxygen and Graphviz not found. Disabling support for documentation generation") endif(DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) -# DATE -if(DATE_CONFIG) - find_package(DATE) -endif(DATE_CONFIG) - -# daqDA -if(daqDA) - find_package(daqDA) -endif(daqDA) - -# DA is enabled -if(DA) - if(NOT DATE_FOUND) - set(DA FALSE) - message(FATAL_ERROR "DAs enabled but no DATE support found. Please point to your date installation using \"DATE_CONFIG\"") - endif() - - if(NOT daqDA_FOUND) - set(DA FALSE) - message(FATAL_ERROR "DAs enabled but no daqDA support found. Please point to your daqDA installation using \"daqDA\" variable") - endif() - - # Enable static libraries - set(ALIROOT_STATIC TRUE) - message(STATUS "DAs enabled") -endif(DA) - # FastJet find_package(FASTJET) -- 2.43.0