Skip to content
Closed
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
3 changes: 1 addition & 2 deletions bindings/pyroot/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ ROOT_ADD_PYUNITTEST(pyroot_pretty_printing pretty_printing.py)
ROOT_ADD_PYUNITTEST(pyroot_rvec rvec.py)
if(NUMPY_FOUND)
ROOT_ADD_PYUNITTEST(pyroot_array_interface array_interface.py)
# this excludes RDF for 32 bits builds because of clang/gcc abi issues
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
if(dataframe)
ROOT_ADD_PYUNITTEST(pyroot_rdataframe_asnumpy rdataframe_asnumpy.py)
ROOT_ADD_PYUNITTEST(pyroot_ttree_asmatrix ttree_asmatrix.py)
endif()
Expand Down
9 changes: 7 additions & 2 deletions bindings/pyroot_experimental/PyROOT/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
# CMakeLists.txt file for building ROOT bindings/pyroot_experimental package
############################################################################

if(dataframe)
list(APPEND PYROOT_EXTRA_PYSOURCE ROOT/pythonization/_rdataframe.py)
list(APPEND PYROOT_EXTRA_SOURCE src/RDataFramePyz.cxx)
endif()

set(py_sources
ROOT/__init__.py
ROOT/_application.py
Expand All @@ -10,7 +15,6 @@ set(py_sources
ROOT/pythonization/_drawables.py
ROOT/pythonization/_generic.py
ROOT/pythonization/_rooabscollection.py
ROOT/pythonization/_rdataframe.py
ROOT/pythonization/_rvec.py
ROOT/pythonization/_stl_vector.py
ROOT/pythonization/_tarray.py
Expand All @@ -30,6 +34,7 @@ set(py_sources
ROOT/pythonization/_ttree.py
ROOT/pythonization/_tvector3.py
ROOT/pythonization/_tvectort.py
${PYROOT_EXTRA_PYSOURCE)
)

set(sources
Expand All @@ -39,7 +44,6 @@ set(sources
src/PyROOTWrapper.cxx
src/RPyROOTApplication.cxx
src/GenericPyz.cxx
src/RDataFramePyz.cxx
src/RVecPyz.cxx
src/TClassPyz.cxx
src/TClonesArrayPyz.cxx
Expand All @@ -49,6 +53,7 @@ set(sources
src/TTreePyz.cxx
src/PyzCppHelpers.cxx
src/PyzPythonHelpers.cxx
${PYROOT_EXTRA_SOURCE}
)

file(COPY python/ROOT DESTINATION ${localruntimedir})
Expand Down
6 changes: 4 additions & 2 deletions bindings/pyroot_experimental/PyROOT/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ ROOT_ADD_PYUNITTEST(pyroot_pyz_tobjstring_comparisonops tobjstring_comparisonops
ROOT_ADD_PYUNITTEST(pyroot_pyz_rvec_asrvec rvec_asrvec.py)

# RDataFrame and subclasses pythonizations
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_asnumpy rdataframe_asnumpy.py)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_makenumpy rdataframe_makenumpy.py)
if (dataframe)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_asnumpy rdataframe_asnumpy.py)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_makenumpy rdataframe_makenumpy.py)
endif()

# Passing Python callables to ROOT.TF
ROOT_ADD_PYUNITTEST(pyroot_pyz_tf_pycallables tf_pycallables.py)
Expand Down
8 changes: 8 additions & 0 deletions cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X o
ROOT_BUILD_OPTION(coverage OFF "Enable compile flags for coverage testing")
ROOT_BUILD_OPTION(cuda OFF "Enable support for CUDA (requires CUDA toolkit >= 7.5)")
ROOT_BUILD_OPTION(cxxmodules OFF "Enable support for C++ modules")
ROOT_BUILD_OPTION(dataframe ON "Enable ROOT RDataFrame")
ROOT_BUILD_OPTION(davix ON "Enable support for Davix (HTTP/WebDAV access)")
ROOT_BUILD_OPTION(dcache OFF "Enable support for dCache (requires libdcap from DESY)")
ROOT_BUILD_OPTION(exceptions ON "Enable compiler exception handling")
Expand Down Expand Up @@ -196,6 +197,7 @@ if(all)
set(cefweb_defvalue ON)
set(clad_defvalue ON)
set(cuda_defvalue ON)
set(dataframe_defvalue ON)
set(davix_defvalue ON)
set(dcache_defvalue ON)
set(fftw3_defvalue ON)
Expand Down Expand Up @@ -272,6 +274,7 @@ endif()
#---Changes in defaults due to platform-------------------------------------------------------
if(WIN32)
set(builtin_tbb_defvalue OFF)
set(dataframe_defvalue OFF)
set(davix_defvalue OFF)
set(imt_defvalue OFF)
set(memstat_defvalue OFF)
Expand All @@ -286,6 +289,11 @@ elseif(APPLE)
set(x11_defvalue OFF)
endif()

# Disable RDataFrame on 32-bit UNIX platforms due to ROOT-9236
if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(dataframe_defvalue OFF)
endif()

#---Options depending of CMake Generator-------------------------------------------------------
if( CMAKE_GENERATOR STREQUAL Ninja)
set(fortran_defvalue OFF)
Expand Down
3 changes: 1 addition & 2 deletions config/root-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ rootlibs="-lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lROOTVecOps -l
-lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread\
-lMultiProc"

if [ "@UNIX@" != "1" ] || [ "@CMAKE_SIZEOF_VOID_P@" != "4" ]; then
if [ "@dataframe@" == "ON" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the suggestion below for now, but we should have a generic solution if more things are allowed to be OFF in the future:

Suggested change
if [ "@dataframe@" == "ON" ]; then
if echo "${features}" | grep -q "dataframe"; then

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, Stefan didn't enable pushing by repo owners. I'll merge (after amending) by hand.

rootlibs="$rootlibs -lROOTDataFrame"
fi


if test "$platform" = "win32"; then
rootulibs="-include:_G__cpp_setupG__Net \
-include:_G__cpp_setupG__IO \
Expand Down
24 changes: 17 additions & 7 deletions tmva/tmva/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ else()
set(installoptions ${installoptions} FILTER "Cuda")
endif()

# Enable parts dependent RDataFrame
if(dataframe)
set(TMVA_EXTRA_HEADERS
TMVA/RTensor.hxx
TMVA/RTensorUtils.hxx
)
set(TMVA_EXTRA_DEPENDENCIES
ROOTDataFrame
ROOTVecOps
)
endif()

ROOT_STANDARD_LIBRARY_PACKAGE(TMVA
HEADERS
TMVA/BDTEventWrapper.h
Expand Down Expand Up @@ -178,8 +190,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(TMVA
TMVA/VarTransformHandler.h
TMVA/Version.h
TMVA/Volume.h
TMVA/RTensor.hxx
TMVA/RTensorUtils.hxx
${TMVA_EXTRA_HEADERS}
SOURCES
src/BDTEventWrapper.cxx
src/BinarySearchTree.cxx
Expand Down Expand Up @@ -351,14 +362,9 @@ ROOT_STANDARD_LIBRARY_PACKAGE(TMVA
#src/DNN/Architectures/Reference/Propagation.cxx
#src/DNN/Architectures/Reference/RecurrentPropagation.cxx
#src/DNN/Architectures/Reference/Regularization.cxx
DICTIONARY_OPTIONS
-writeEmptyRootPCM
${dictoptions}
DEPENDENCIES
TreePlayer
Tree
ROOTDataFrame
ROOTVecOps
Hist
Matrix
Minuit
Expand All @@ -368,6 +374,10 @@ ROOT_STANDARD_LIBRARY_PACKAGE(TMVA
Imt
RIO
XMLIO
${TMVA_EXTRA_DEPENDENCIES}
DICTIONARY_OPTIONS
-writeEmptyRootPCM
${dictoptions}
INSTALL_OPTIONS
${installoptions}
)
Expand Down
7 changes: 5 additions & 2 deletions tmva/tmva/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ include_directories(${ROOT_INCLUDE_DIRS})
ROOT_ADD_GTEST(TestRandomGenerator
TestRandomGenerator.cxx
LIBRARIES ${Libraries})
ROOT_ADD_GTEST(rtensor rtensor.cxx LIBRARIES ROOTVecOps TMVA)
ROOT_ADD_GTEST(rtensor-utils rtensor_utils.cxx LIBRARIES ROOTVecOps TMVA ROOTDataFrame)

if(dataframe)
ROOT_ADD_GTEST(rtensor rtensor.cxx LIBRARIES ROOTVecOps TMVA)
ROOT_ADD_GTEST(rtensor-utils rtensor_utils.cxx LIBRARIES ROOTVecOps TMVA ROOTDataFrame)
endif()

project(tmva-tests)
find_package(ROOT REQUIRED)
Expand Down
5 changes: 2 additions & 3 deletions tree/dataframe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
# @author Danilo Piparo CERN, Pere Mato CERN
############################################################################

# Disable RDataFrame on 32-bit UNIX platforms due to ROOT-9236
if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4)
return()
if(NOT dataframe)
return()
endif()

if(arrow)
Expand Down
2 changes: 1 addition & 1 deletion tree/ntuple/v7/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @author Jakob Blomer CERN

if(NOT ROOT_ROOTDataFrame_LIBRARY)
if(NOT dataframe)
return()
endif()

Expand Down
22 changes: 16 additions & 6 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ if(NOT ROOT_minuit2_FOUND)
tutorials/roostats/rs_bernsteinCorrection.C)
endif()

if (NOT dataframe)
# RDataFrame
list(APPEND dataframe_veto dataframe/*.C)
# RDataFrame tutorial in graphs
list(APPEND dataframe_veto graphs/timeSeriesFromCSV_TDF.C)
# TMVA tutorials dependent on RDataFrame
list(APPEND dataframe_veto tmva/tmva*.C)
endif()

if(NOT ROOT_mlp_FOUND)
set(mlp_veto legacy/mlp/*.C)
endif()
Expand Down Expand Up @@ -185,10 +194,10 @@ set(gui_veto fit/fitpanel_playback.C
eve/*.C)

if (NOT ROOT_tmva_FOUND)
set(tmva_veto tmva/*.C tmva/*.py tmva/envelope/*.C tmva/keras/*.C tmva/keras/*.py)
list(APPEND tmva_veto tmva/*.C tmva/*.py tmva/envelope/*.C tmva/keras/*.C tmva/keras/*.py)
else()
#---These do not need to run for TMVA
set(tmva_veto tmva/createData.C)
list(APPEND tmva_veto tmva/createData.C)
endif()

if (NOT ROOT_pythia6_FOUND)
Expand Down Expand Up @@ -280,6 +289,7 @@ set(all_veto hsimple.C
${xrootd_veto}
${mlp_veto}
${spectrum_veto}
${dataframe_veto}
)

file(GLOB_RECURSE tutorials RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.C)
Expand Down Expand Up @@ -436,10 +446,10 @@ if(ROOT_python_FOUND)

list(REMOVE_ITEM pytutorials ${pyveto})

if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set(bits32_veto_py dataframe/*.py)
file(GLOB bits32_veto_py RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} dataframe/*.py)
list(REMOVE_ITEM pytutorials ${bits32_veto_py})
if(NOT dataframe)
set(dataframe_veto_py dataframe/*.py)
file(GLOB dataframe_veto_py RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} dataframe/*.py tmva/tmva*.py)
list(REMOVE_ITEM pytutorials ${dataframe_veto_py})
list(REMOVE_ITEM pytutorials pyroot/pyroot002_TTreeAsMatrix.py)
endif()

Expand Down