Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace genreflex in favor of rootcling #379

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion cmake/BioDynaMo.cmake
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ function(build_shared_library TARGET)
# We always need dictionaries for the plugins (plugin manager requires class
# information)
if(dict OR DEFINED ARG_PLUGIN)
# generate dictionary using genreflex
# generate dictionary using rootcling reflex
set(DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_dict")
set(BDM_DICT_FILE "${CMAKE_CURRENT_BINARY_DIR}/lib${TARGET}_bdm_dict.cc")

4 changes: 1 addition & 3 deletions cmake/FindROOT.cmake
Original file line number Diff line number Diff line change
@@ -97,8 +97,6 @@ mark_as_advanced(ROOT_CONFIG_EXECUTABLE)
include(CMakeParseArguments)
find_program(ROOTCLING_EXECUTABLE rootcling
HINTS "$ENV{ROOTSYS}/bin" "$ENV{BDM_ROOT_DIR}/bin" "${CMAKE_THIRD_PARTY_DIR}/root/bin")
find_program(GENREFLEX_EXECUTABLE genreflex
HINTS "$ENV{ROOTSYS}/bin" "$ENV{BDM_ROOT_DIR}/bin" "${CMAKE_THIRD_PARTY_DIR}/root/bin")
#find_package(GCCXML)

# We use the launcher script to emulate a `source thisbdm.sh` call
@@ -198,7 +196,7 @@ function(REFLEX_GENERATE_DICTIONARY dictionary)
#set(rootmapopts --rootmap=${rootmapname} --rootmap-lib=${libprefix}${dictionary}Dict)
#---Actual command----------------------------------------
add_custom_command(OUTPUT ${gensrcdict} ${rootmapname} ${dictionary}_rdict.pcm
COMMAND ${LAUNCHER} ${GENREFLEX_EXECUTABLE} ${headerfiles} -o ${gensrcdict} ${rootmapopts} --select=${selectionfile} --noIncludePaths
COMMAND ${ROOTCLING_EXECUTABLE} -reflex -f ${gensrcdict} ${rootmapopts} ${headerfiles} ${selectionfile} -noIncludePaths -inlineInputHeader
imorlxs marked this conversation as resolved.
Show resolved Hide resolved
${ARG_OPTIONS} ${includedirs} ${definitions}
DEPENDS ${headerfiles} ${selectionfile})
endfunction()
1 change: 0 additions & 1 deletion cmake/utils.cmake
Original file line number Diff line number Diff line change
@@ -109,7 +109,6 @@ function(verify_ROOT)
SET(ROOT_ETC_DIR ${ROOT_ETC_DIR} PARENT_SCOPE)
SET(ROOT_CONFIG_EXECUTABLE ${ROOT_CONFIG_EXECUTABLE} PARENT_SCOPE)
SET(ROOTCLING_EXECUTABLE ${ROOTCLING_EXECUTABLE} PARENT_SCOPE)
SET(GENREFLEX_EXECUTABLE ${GENREFLEX_EXECUTABLE} PARENT_SCOPE)
else()
# When ROOT is found, but it's not C++17 compliant, we exit the installation, because ROOT needs
# to be properly sourced prior to invoking CMake (CMake cannot do this for us, because it requires
2 changes: 1 addition & 1 deletion util/makefile-build/bdm-code-generation
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ CXX_INCLUDES=$(${BDM_CONFIG} --cxxincludes | sed 's|-isystem |-I|g')

CXX_DEFINES=$(${BDM_CONFIG} --cxxdefines)

genreflex ${HEADERS} -o ${DICT} --noIncludePaths --select=${SELECTIONFILE} ${CXX_DEFINES} ${CXX_INCLUDES} $ADDITIONAL_CXX_FLAGS
rootcling -reflex -o ${DICT} ${HEADERS} --noIncludePaths -inlineInputHeader --select=${SELECTIONFILE} ${CXX_DEFINES} ${CXX_INCLUDES} $ADDITIONAL_CXX_FLAGS

# Generate bdm dictionary and append to DICT
BDM_DICT=$(mktemp)