Skip to content
Snippets Groups Projects
Select Git revision
  • 58c7c7edc696407d35c09eea65a6209a72e380a3
  • master default protected
  • jul25_patches
  • nightly_master
  • online_mvd_readconf_cleanup protected
  • online_much_readconf_cleanup protected
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • RC2_jul25
  • dev_2025_46
  • dev_2025_45
  • dev_2025_44
  • dev_2025_43
  • dev_2025_42
  • dev_2025_41
  • dev_2025_40
  • dev_2025_39
  • dev_2025_38
  • dev_2025_37
  • dev_2025_36
  • dev_2025_35
  • dev_2025_34
  • dev_2025_33
  • dev_2025_32
  • dev_2025_31
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
38 results

Config.cxx

Blame
  • AnalysisTree.patch 3.64 KiB
    diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
    index 789179c..6d4d73c 100644
    --- a/core/CMakeLists.txt
    +++ b/core/CMakeLists.txt
    @@ -16,7 +16,28 @@ string(REPLACE ".cpp" ".hpp" HEADERS "${SOURCES}")
     list(APPEND HEADERS "Constants.hpp" "Detector.hpp")
     
     add_library(AnalysisTreeBase SHARED ${SOURCES} G__AnalysisTreeBase.cxx)
    -ROOT_GENERATE_DICTIONARY(G__AnalysisTreeBase ${HEADERS} LINKDEF AnalysisTreeCoreLinkDef.h)
    +
    +if(${ROOT_VERSION} VERSION_GREATER 6.18.0)
    +  message(STATUS "ROOT ${ROOT_VERSION}, use the standard ROOT_GENERATE_DICTIONARY macro.")
    +  ROOT_GENERATE_DICTIONARY(G__AnalysisTreeBase ${HEADERS} LINKDEF AnalysisTreeCoreLinkDef.h)
    +else()
    +  message(STATUS "ROOT ${ROOT_VERSION} has a broken ROOT_GENERATE_DICTIONARY macro, so build the dictionary ourself.")
    +  set(dictionary_includes ${HEADERS})
    +  set(dictionary_linkdef "AnalysisTreeCoreLinkDef.h")
    +  set(dictionary_source "G__AnalysisTreeBase.cxx")
    +
    +  add_custom_command(OUTPUT ${dictionary_source}
    +                     COMMAND ${ROOT_rootcling_CMD} -f ${dictionary_source}
    +                     -rml libAnalysisTreeBase
    +                     -rmf libAnalysisTreeBase.rootmap
    +                     -s   libAnalysisTreeBase
    +                     -inlineInputHeader
    +                     -I${CMAKE_CURRENT_SOURCE_DIR} ${dictionary_includes}
    +                     ${CMAKE_CURRENT_SOURCE_DIR}/${dictionary_linkdef}
    +                     DEPENDS ${dictionary_includes} ${dictionary_linkdef}
    +                    )
    +endif()
    +
     target_link_libraries(AnalysisTreeBase ${ROOT_LIBRARIES} EG)
     
     add_custom_target(AnalysisTreeBaseCopyHeaders ALL
    diff --git a/infra/CMakeLists.txt b/infra/CMakeLists.txt
    index af1d392..97dcb15 100644
    --- a/infra/CMakeLists.txt
    +++ b/infra/CMakeLists.txt
    @@ -26,12 +26,34 @@ add_library(AnalysisTreeInfra SHARED ${SOURCES} G__AnalysisTreeInfra.cxx)
     target_compile_definitions(AnalysisTreeInfra PUBLIC
             $<$<BOOL:${Boost_FOUND}>:ANALYSISTREE_BOOST_FOUND>)
     
    -ROOT_GENERATE_DICTIONARY(G__AnalysisTreeInfra ${HEADERS}
    -        LINKDEF AnalysisTreeInfraLinkDef.h
    -        OPTIONS
    -            -I${CMAKE_BINARY_DIR}/include
    -            $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
    -        )
    +if(${ROOT_VERSION} VERSION_GREATER 6.18.0)
    +  message(STATUS "ROOT ${ROOT_VERSION}, use the standard ROOT_GENERATE_DICTIONARY macro.")
    +  ROOT_GENERATE_DICTIONARY(G__AnalysisTreeInfra ${HEADERS}
    +          LINKDEF AnalysisTreeInfraLinkDef.h
    +          OPTIONS
    +              -I${CMAKE_BINARY_DIR}/include
    +              $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
    +          )
    +else()
    +  message(STATUS "ROOT ${ROOT_VERSION} has a broken ROOT_GENERATE_DICTIONARY macro, so build the dictionary ourself.")
    +  set(dictionary_includes ${HEADERS})
    +  set(dictionary_linkdef "AnalysisTreeInfraLinkDef.h")
    +  set(dictionary_source "G__AnalysisTreeInfra.cxx")
    +
    +  add_custom_command(OUTPUT ${dictionary_source}
    +                     COMMAND ${ROOT_rootcling_CMD} -f ${dictionary_source}
    +                     -rml libAnalysisTreeInfra
    +                     -rmf libAnalysisTreeInfra.rootmap
    +                     -s   libAnalysisTreeInfra
    +                     -inlineInputHeader
    +                     -I${CMAKE_CURRENT_SOURCE_DIR} ${dictionary_includes}
    +                     -I${CMAKE_BINARY_DIR}/include
    +                     -I${CMAKE_BINARY_DIR}/include/AnalysisTree
    +                     $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
    +                     ${CMAKE_CURRENT_SOURCE_DIR}/${dictionary_linkdef}
    +                     DEPENDS ${dictionary_includes} ${dictionary_linkdef}
    +                    )
    +endif()
     target_link_libraries(AnalysisTreeInfra
             PUBLIC
                 AnalysisTreeBase