Dear all,
I have a CMake project where i generate dictionaries to build python bindings for some classes I have and the I/O features for them in ROOT.
I wonder if there is some faster version of the current macro.
I am not sure I am using the correct workflow but basically for a given module of the analysis the strategy used is :
#Declare function to generate dictionaries!
function(GENERATE_DICTIONARY dictionary)
if(${ROOT_VERSION} LESS 6.0)
ROOT_GENERATE_DICTIONARY(${dictionary} ${ARGN})
else()
ROOT_GENERATE_DICTIONARY(${dictionary} MODULE ${dictionary} ${ARGN})
endif()
endfunction()
set(PROJECT kernel)
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
file(GLOB HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.hpp)
file(GLOB HEADERS2 ${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h)
message(STATUS "SRCS = ${SOURCES}")
message(STATUS "INCS = ${HEADERS}")
ROOT_GENERATE_DICTIONARY(${PROJECT}Dict ${HEADERS} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h MODULE ${PROJECT
})
add_library(${PROJECT} SHARED ${SOURCES} ${PROJECT}Dict.cxx)
target_link_libraries(${PROJECT} PUBLIC ${PKG_LIBRARIES} velo)