Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
CMAKE_CXX_FLAGS=-march=native
CMAKE_C_FLAGS=-march=native
CMAKE_CXX_STANDARD=20
CMAKE_C_FLAGS=-march=native
builtin_nlohmannjson=ON
builtin_tbb=ON
builtin_unuran=ON
builtin_vdt=ON
builtin_xrootd=ON
builtin_unuran=ON
builtin_nlohmannjson=ON
gnuinstall=ON
pythia8=OFF
r=OFF
test_distrdf_dask=OFF
test_distrdf_pyspark=OFF
tmva-pymva=ON
tmva-sofie=ON
pythia8=OFF
r=OFF
5 changes: 5 additions & 0 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@
- platform: mac-beta
is_special: true
arch: ARM64
# For the PR and incremental builds, we set gnuinstall=ON to check
# if CMake can deal with the different structure of the install and
# build tree at build and test time. We don't care how the install
# actually looks like.
overrides: ["gnuinstall=ON"]

runs-on:
- self-hosted
Expand Down Expand Up @@ -157,7 +162,7 @@
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') && !matrix.platform == 'mac15' && !matrix.platform == 'mac26'}}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
run: |

Check failure on line 165 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
[ -d "${VIRTUAL_ENV_DIR}" ] && source ${VIRTUAL_ENV_DIR}/bin/activate
echo "Python is now $(which python3) $(python3 --version)"
src/.github/workflows/root-ci-config/build_root.py \
Expand Down Expand Up @@ -287,7 +292,7 @@
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
shell: cmd
run: "C:\\setenv.bat ${{ matrix.target_arch }} &&

Check failure on line 295 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
python .github/workflows/root-ci-config/build_root.py
--buildtype ${{ matrix.config }}
--platform windows10
Expand Down Expand Up @@ -447,7 +452,7 @@
- self-hosted
- linux
- ${{ matrix.architecture == null && 'x64' || matrix.architecture }}
- ${{ matrix.extra-runs-on == null && 'cpu' || matrix.extra-runs-on }}

Check failure on line 455 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; image: string; is_special: bool; overrides: array<string>; platform_config: string; property: string}

Check failure on line 455 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

property "extra-runs-on" is not defined in object type {architecture: string; image: string; is_special: bool; overrides: array<string>; platform_config: string; property: string}

name: |
${{ matrix.image }} ${{ matrix.property }}
Expand Down Expand Up @@ -512,7 +517,7 @@
INCREMENTAL: ${{ !contains(github.event.pull_request.labels.*.name, 'clean build') }}
GITHUB_PR_ORIGIN: ${{ github.event.pull_request.head.repo.clone_url }}
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
run: ".github/workflows/root-ci-config/build_root.py

Check failure on line 520 in .github/workflows/root-ci.yml

View workflow job for this annotation

GitHub Actions / lint-action-files

"github.event.pull_request.head.ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/reference/security/secure-use#good-practices-for-mitigating-script-injection-attacks for more details
--buildtype RelWithDebInfo
--platform ${{ matrix.image }}
--platform_config ${{ matrix.platform_config }}
Expand Down
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ else()
${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py
${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch}
COMMAND
${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE}
${Python3_EXECUTABLE}
${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch
${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core
DEPENDS
Expand Down Expand Up @@ -541,10 +541,10 @@ if(runtime_cxxmodules)
get_property(modules_idx_deps GLOBAL PROPERTY modules_idx_deps_property)
if(WIN32)
set(modules_idx_cmd COMMAND ${CMAKE_COMMAND} -E env PATH="${library_output_dir}\\\;%PATH%"
ROOTIGNOREPREFIX=1 ROOT_HIST=0 $<TARGET_FILE:root.exe> -l -q -b)
ROOT_HIST=0 $<TARGET_FILE:root.exe> -l -q -b)
else()
set(modules_idx_cmd COMMAND ROOT_INCLUDE_PATH=${DEFAULT_ROOT_INCLUDE_PATH}
ROOTIGNOREPREFIX=1 ROOT_HIST=0 $<TARGET_FILE:root.exe> -l -q -b)
ROOT_HIST=0 $<TARGET_FILE:root.exe> -l -q -b)
endif()
add_custom_command(OUTPUT ${library_output_dir}/modules.idx
COMMAND ${CMAKE_COMMAND} -E remove -f modules.idx modules.timestamp
Expand All @@ -570,7 +570,6 @@ if(NOT CMAKE_CROSSCOMPILING)
COMMAND
${CMAKE_COMMAND} -E env
ROOT_INCLUDE_PATH=${DEFAULT_ROOT_INCLUDE_PATH}
ROOTIGNOREPREFIX=1
ROOT_HIST=0
$<TARGET_FILE:root.exe> -q -b -n
-e ".L ${CMAKE_SOURCE_DIR}/tutorials/hsimple.C"
Expand Down
4 changes: 0 additions & 4 deletions cmake/modules/CheckCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,6 @@ if(gcctoolchain)
endif()
endif()

if(gnuinstall)
set(R__HAVE_CONFIG 1)
endif()

#---Check if we use the new libstdc++ CXX11 ABI-----------------------------------------------------
# Necessary to compile check_cxx_source_compiles this early
include(CheckCXXSourceCompiles)
Expand Down
9 changes: 3 additions & 6 deletions cmake/modules/RootMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,12 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
else()
if(CMAKE_PROJECT_NAME STREQUAL ROOT)
if(MSVC AND CMAKE_ROOTTEST_DICT)
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe -rootbuild)
set(command ${CMAKE_BINARY_DIR}/bin/rootcling.exe -rootbuild)
else()
if(APPLE)
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" SDKROOT=${CMAKE_OSX_SYSROOT} $<TARGET_FILE:rootcling> -rootbuild)
set(command ${CMAKE_COMMAND} -E env SDKROOT=${CMAKE_OSX_SYSROOT} $<TARGET_FILE:rootcling> -rootbuild)
else()
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
set(command $<TARGET_FILE:rootcling> -rootbuild)
endif()
# Modules need RConfigure.h copied into include/.
set(ROOTCLINGDEP rootcling rconfigure)
Expand Down Expand Up @@ -1817,9 +1817,6 @@ function(ROOT_ADD_TEST test)
set_property(TEST ${test} PROPERTY ENVIRONMENT ROOT_DIR=${CMAKE_BINARY_DIR})
else()
add_test(NAME ${test} COMMAND ${_command})
if (gnuinstall)
set_property(TEST ${test} PROPERTY ENVIRONMENT ROOTIGNOREPREFIX=1)
endif()
endif()

#- provided fixtures and resource lock are set here
Expand Down
5 changes: 2 additions & 3 deletions cmake/scripts/compiledata.win32.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/* This file is automatically generated */
#define BUILD_ARCH "@ROOT_ARCHITECTURE@"
#define BUILD_NODE "@BuildNodeInfo@"
#define CXX "@CMAKE_CXX_COMPILER@"
#define COMPILER "@CMAKE_CXX_COMPILER@"
#define COMPILERVERS "@CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@"
#define COMPILERVERSSTR "@CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@"
#define MAKESHAREDLIB "cl $Opt -nologo -TP -c @CMAKE_CXX_FLAGS@ @BLDCXXFLAGS@ $IncludePath $SourceFiles -Fo$ObjectFiles && bindexplib $LibName $ObjectFiles > $BuildDir\\$LibName.def && lib -nologo -MACHINE:@MACHINE_ARCH@ -out:$BuildDir\\$LibName.lib $ObjectFiles -def:$BuildDir\\$LibName.def && link -nologo $ObjectFiles -DLL -out:$BuildDir\\$LibName.dll $BuildDir\\$LibName.exp -LIBPATH:%ROOTSYS%\\lib $LinkedLibs libCore.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib && if EXIST \"$BuildDir\\$LibName.dll.manifest\" ( mt -nologo -manifest \"$BuildDir\\$LibName.dll.manifest\" \"-outputresource:$BuildDir\\$LibName.dll;2\" && del \"$BuildDir\\$LibName.dll.manifest\" )"
#define MAKESHAREDLIB "cl $Opt -nologo -TP -c @CMAKE_CXX_FLAGS@ @BLDCXXFLAGS@ $IncludePath $SourceFiles -Fo$ObjectFiles && $BinDir\\bindexplib $LibName $ObjectFiles > $BuildDir\\$LibName.def && lib -nologo -MACHINE:@MACHINE_ARCH@ -out:$BuildDir\\$LibName.lib $ObjectFiles -def:$BuildDir\\$LibName.def && link -nologo $ObjectFiles -DLL -out:$BuildDir\\$LibName.dll $BuildDir\\$LibName.exp -LIBPATH:$LibDir $LinkedLibs libCore.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib && if EXIST \"$BuildDir\\$LibName.dll.manifest\" ( mt -nologo -manifest \"$BuildDir\\$LibName.dll.manifest\" \"-outputresource:$BuildDir\\$LibName.dll;2\" && del \"$BuildDir\\$LibName.dll.manifest\" )"
#define MAKEEXE "cl -nologo -TP -Iinclude -I..\\include -c $Opt @CMAKE_CXX_FLAGS@ @BLDCXXFLAGS@ $IncludePath $SourceFiles && link -opt:ref @CMAKE_EXE_FLAGS@ $ObjectFiles $LinkedLibs advapi32.lib -out:$ExeName && if EXIST \"$ExeName.exe.manifest\" ( mt -nologo -manifest \"$ExeName.exe.manifest\" \"-outputresource:$ExeName.exe;1\" && del \"$ExeName.exe.manifest\" )"
#define CXXOPT "@CMAKE_CXX_FLAGS_RELEASE@ @BLDCXXFLAGS@"
#define CXXDEBUG "@CMAKE_CXX_FLAGS_DEBUG@ @BLDCXXFLAGS@"
#define ROOTBUILD "release"
#define LINKEDLIBS "-LIBPATH:%ROOTSYS%\\lib libCore.lib "
#define LINKEDLIBS "-LIBPATH:$LibDir libCore.lib "
#define OBJEXT "obj"
#define SOEXT "dll"
16 changes: 0 additions & 16 deletions config/RConfigure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@

/* Configurations file for @architecture@ */

#cmakedefine R__HAVE_CONFIG

#ifdef R__HAVE_CONFIG
#define ROOTPREFIX "@prefix@"
#define ROOTBINDIR "@bindir@"
#define ROOTLIBDIR "@libdir@"
#define ROOTETCDIR "@etcdir@"
#define ROOTDATADIR "@datadir@"
#define ROOTDOCDIR "@docdir@"
#define ROOTMACRODIR "@macrodir@"
#define ROOTTUTDIR "@tutdir@"
#define ROOTSRCDIR "@srcdir@"
#define ROOTICONPATH "@iconpath@"
#define TTFFONTDIR "@ttffontdir@"
#endif

#define EXTRAICONPATH "@extraiconpath@"

#define ROOT__cplusplus @__cplusplus@
Expand Down
45 changes: 37 additions & 8 deletions core/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,49 @@ endif()

# Absolue CMAKE_INSTALL_<dir> paths are discouraged in CMake, but some
# packagers use them anyway. So we support it.
if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR})
set(install_lib_to_include "${CMAKE_INSTALL_INCLUDEDIR}")
else()
if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
set(libdir "${CMAKE_INSTALL_LIBDIR}")

function(install_path_from_libdir out_var install_dir)
if(IS_ABSOLUTE "${install_dir}")
set(install_dir_absolute "${install_dir}")
else()
set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set(install_dir_absolute "${CMAKE_INSTALL_PREFIX}/${install_dir}")
endif()
file(RELATIVE_PATH install_lib_to_include "${libdir}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
unset(libdir)
file(RELATIVE_PATH _rel "${libdir}" "${install_dir_absolute}")
set("${out_var}" "${_rel}" PARENT_SCOPE)
endfunction()

if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
set(libdir "${CMAKE_INSTALL_LIBDIR}")
else()
set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()

install_path_from_libdir(install_lib_to_bin "${CMAKE_INSTALL_BINDIR}")
install_path_from_libdir(install_lib_to_data "${CMAKE_INSTALL_DATADIR}")
install_path_from_libdir(install_lib_to_docs "${CMAKE_INSTALL_DOCDIR}")
install_path_from_libdir(install_lib_to_etc "${CMAKE_INSTALL_SYSCONFDIR}")
install_path_from_libdir(install_lib_to_fonts "${CMAKE_INSTALL_FONTDIR}")
install_path_from_libdir(install_lib_to_icons "${CMAKE_INSTALL_ICONDIR}")
install_path_from_libdir(install_lib_to_include "${CMAKE_INSTALL_INCLUDEDIR}")
install_path_from_libdir(install_lib_to_macros "${CMAKE_INSTALL_MACRODIR}")
install_path_from_libdir(install_lib_to_rootsys "${CMAKE_INSTALL_PREFIX}")
install_path_from_libdir(install_lib_to_src "${CMAKE_INSTALL_SRCDIR}")
install_path_from_libdir(install_lib_to_tutorials "${CMAKE_INSTALL_TUTDIR}")

unset(libdir)

target_compile_options(Core PRIVATE -DLIB_CORE_NAME=${full_core_filename}
-DINSTALL_LIB_TO_BIN="${install_lib_to_bin}"
-DINSTALL_LIB_TO_DATA="${install_lib_to_data}"
-DINSTALL_LIB_TO_DOCS="${install_lib_to_docs}"
-DINSTALL_LIB_TO_ETC="${install_lib_to_etc}"
-DINSTALL_LIB_TO_FONTS="${install_lib_to_fonts}"
-DINSTALL_LIB_TO_ICONS="${install_lib_to_icons}"
-DINSTALL_LIB_TO_INCLUDE="${install_lib_to_include}"
-DINSTALL_LIB_TO_MACROS="${install_lib_to_macros}"
-DINSTALL_LIB_TO_ROOTSYS="${install_lib_to_rootsys}"
-DINSTALL_LIB_TO_SRC="${install_lib_to_src}"
-DINSTALL_LIB_TO_TUTORIALS="${install_lib_to_tutorials}"
)
add_dependencies(Core ensure_build_tree_marker)

Expand Down
17 changes: 17 additions & 0 deletions core/base/inc/TROOT.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,23 @@ namespace ROOT {
inline Bool_t RequiresCleanup(TObject &obj) {
return obj.TestBit(kIsReferenced) && obj.GetUniqueID() == 0;
}

struct ResourceDirs {
bool initialized = false;
TString bin;
TString data;
TString docs;
TString etc;
TString fonts;
TString icons;
TString include;
TString macros;
TString rootsys;
TString src;
TString tutorials;
};

ResourceDirs const &GetResourceDirs();
}

/// \brief call RecursiveRemove for obj if gROOT is valid
Expand Down
Loading
Loading