diff --git a/CMakeLists.txt b/CMakeLists.txt index ad9ff723e2d45faea77efa9d2b1aff16b8ab81d3..4003cb87f8dd6831868f78f9624205e1204a9578 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,31 +53,21 @@ include(CbmMacros) include(CbmTargets) include(CbmCompilerSettings) -# Do some basic checks -# out-of-source build, unix system and -# existence of FAIRROOTPATH and SIMPATH variables -Check_Prerequisites() - -# Load cmake functionality from the FairRoot installation -if(IS_DIRECTORY ${FAIRROOTPATH}/share/fairbase/cmake/modules) - list(APPEND CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules") -endif() -if(IS_DIRECTORY ${FAIRROOTPATH}/share/fairbase/cmake/modules_old) - list(APPEND CMAKE_MODULE_PATH "${FAIRROOTPATH}/share/fairbase/cmake/modules_old") -endif() include(FairMacros) include(WriteConfigFile) include(CheckCompiler) +include(ROOTMacros) +# Do some basic checks +# out-of-source build, unix system and +# existence of FAIRROOTPATH and SIMPATH variables +Check_Prerequisites() # Has to be called after the CMAKE_MODULE_PATH contains the FairRoot # directories since the file is part of FairRoot set(FairRoot_DIR ${FAIRROOTPATH}) find_package(FairRoot REQUIRED) - - - # Check if the compiler supports the needed C++ standard # Check for the minimum required versions of FairSoft and FairRoot check_external_stack() @@ -109,6 +99,9 @@ set(FAIRROOT_LIBRARY_PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES} # For example the framework can run without GEANT4, but ROOT is # mandatory find_package(ROOT 6.22.08 REQUIRED) +set(ROOT_CINT_EXECUTABLE ${SIMPATH}/bin/rootcling) +set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIRS}) +set(ROOT_CONFIG_EXECUTABLE ${SIMPATH}/bin/root-config) if("${ROOT_VERSION_MAJOR}.${ROOT_VERSION_MINOR}" VERSION_LESS 6.26) Execute_Process(COMMAND ${ROOT_CONFIG_EXECUTABLE} --has-vmc OUTPUT_VARIABLE ROOT_vmc_FOUND diff --git a/cmake/modules/ROOTMacros.cmake b/cmake/modules/ROOTMacros.cmake index c06d3384913723d2404fe3e21711f9f96bea82c2..9cd66f679daf63c7a8cef31f3b4eb6e1dc216751 100644 --- a/cmake/modules/ROOTMacros.cmake +++ b/cmake/modules/ROOTMacros.cmake @@ -203,7 +203,7 @@ Macro(GENERATE_LIBRARY) Else( IS_ABSOLUTE ${LINKDEF}) Set(Int_LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/${LINKDEF}) EndIf( IS_ABSOLUTE ${LINKDEF}) - ROOT_GENERATE_DICTIONARY() + ROOT_GENERATE_DICTIONARY_NEW() SET(Int_SRCS ${Int_SRCS} ${DICTIONARY}) SET_SOURCE_FILES_PROPERTIES(${DICTIONARY} PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast"