Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
ROOT_BUILD_OPTION(root7 OFF "Build the ROOT 7 interface prototype, requires >= cxx14")
ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
ROOT_BUILD_OPTION(runtime_cxxmodules OFF "Enable runtime support for C++ modules.")
ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")
ROOT_BUILD_OPTION(shadowpw ON "Shadow password support")
ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible")
Expand Down
29 changes: 13 additions & 16 deletions cmake/modules/RootNewMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -387,29 +387,26 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
list(APPEND _implicitdeps CXX ${_dep})
endforeach()

# Add other rootcling invocations for our PCM generation. This is only necessary when rootcling is supposed
# to generate C++ modules as those build upon the generated modules of other rootcling invocations.
set(module_dependencies "")
foreach(dep ${ARG_DEPENDENCIES})
if(TARGET ROOTCLING_${dep})
if(runtime_cxxmodules)
foreach(dep ${ARG_DEPENDENCIES})
set(module_dependencies ${module_dependencies} ROOTCLING_${dep})
else()
set(module_dependencies ${module_dependencies} ${dep})
endif()
endforeach()
endforeach()
endif()

#---call rootcint------------------------------------------
add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name}
COMMAND ${command} -v2 -f ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
${ARG_OPTIONS} ${definitions} ${includedirs} ${headerfiles} ${_linkdef}
IMPLICIT_DEPENDS ${_implicitdeps}
DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${ARG_DEPENDENCIES})
DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${ARG_DEPENDENCIES} ${module_dependencies})
get_filename_component(dictname ${dictionary} NAME)

#---roottest compability
if(ARG_NOINSTALL OR CMAKE_ROOTTEST_DICT OR (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY))
add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)
else()
add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)

add_custom_target(${dictname} DEPENDS ${dictionary}.cxx ${pcm_name} ${rootmap_name})
if(NOT ARG_NOINSTALL AND NOT CMAKE_ROOTTEST_DICT AND DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_TARGETS ${dictname})
set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_FILES ${CMAKE_CURRENT_BINARY_DIR}/${dictionary}.cxx)

Expand All @@ -423,12 +420,12 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
endif()
# Create a target for this rootcling invocation based on the module name.
# We can use this in other ROOT_GENERATE_DICTIONARY that only care about
# the generation of PCMs without waiting on the whole module.
if(ARG_MODULE)
# the generation of PCMs without waiting on the whole module compilation.
if(ARG_MODULE AND NOT ARG_MULTIDICT)
# If we have multiple modules with the same name, let's just attach the
# generation of this dictionary to the ROOTCLING_X target of the existing
# module. This happens for example with ROOTCLING_Smatrix which also comes
# in a "Smatrix32" version.
# module. This happens for example with ROOTCLING_Smatrix which also has a
# "Smatrix32" part.
if (TARGET ROOTCLING_${ARG_MODULE})
add_dependencies(ROOTCLING_${ARG_MODULE} ${dictname})
else()
Expand Down