From 2f10d48615959241f157413de51ba28f47788f10 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 10:47:21 +0200 Subject: [PATCH 01/10] [cmake] Do not auto force-enable or force-disable user CMake build options Messing up with the cache is dangerous, and users often complain about not having the control since the build system changes what they just passed as flag to the command line. Instead, convert these automatism into a helpful error message that the user can use as a hotfix to modify their build flags. This prevents surprises, annoying behind-the-scene changes, as well as bugs. Follows up on the phillosophy of https://github.com/root-project/root/pull/23020 Fixes https://its.cern.ch/jira/browse/ROOT-10743 --- README/ReleaseNotes/v642/index.md | 1 + cmake/modules/CheckCompiler.cmake | 2 + cmake/modules/RootBuildOptions.cmake | 2 +- cmake/modules/SearchInstalledSoftware.cmake | 357 +++++++++++++------- gui/qt6webdisplay/CMakeLists.txt | 6 - 5 files changed, 234 insertions(+), 134 deletions(-) diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index bf531a7d43f3b..ae6f74a49fcf6 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -44,6 +44,7 @@ The following people have contributed to this new version: Note that `all=ON` enables several of these options, so building with `-Dall=ON` now requires all of their dependencies to be installed, or the unwanted ones to be disabled explicitly. Build options that are enabled by default, such as `pyroot`, `opengl`, `xml`, `sqlite`, `davix`, `curl`, `tmva-cpu` or `tpython` are not affected: they are still disabled automatically when their dependencies are missing. * The option `fail-on-missing=OFF` will no longer be honored for CMake ROOT build options that have easy-to-install dependencies (e.g. via homebrew or apt-get), such as those required by options `cfitsio`, `civetweb`, `fftw3`, `imt`, `mathmore`, `nlohmann_json`, `tmva-cpu`, `unuran`, `vdt` or `xrootd`. Before, associated `builtin_option` was automatically turned ON (or the opt-in feature turned to OFF), now, user has to install system package or manually set `builtin_option` to `ON` or opt-in feature to `OFF`. +* Irrespective of the value of `fail-on-missing`, all ROOT build options that are contradictory or are missing a dependency will now raise an error rather than letting the build system to automatically turn features OFF or ON. A helpful error message will be printed stating what packages need to be installed or what build flags need to be changed. * The method `RooRealVar::removeRange()` and the corresponding method in `RooErrorVar` that were deprecated in ROOT 6.40 are now removed. * The overloads of `RooAbsReal::createChi2()` and `RooAbsReal::chi2FitTo()` that take unbinned **RooDataSet** data objects were deprecated in ROOT 6.40 and are now removed. * The **RooStats::HybridPlot** class and the related **HybridResult::GetPlot** method were deprecated in ROOT 6.40 and are now removed. diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index c09183ffed443..4aacde172ab4d 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -51,6 +51,8 @@ if(fortran) endif() if(NOT CMAKE_Fortran_COMPILER) message(SEND_ERROR "No Fortran compiler found. Please make sure it's installed, or disable ROOT's Fortran features with '-Dfortran=OFF'") + list(APPEND MISSING_PACKAGES 'gfortran') + list(APPEND HOTFIX_BUILD_FLAGS '-Dfortran=OFF') endif() else() set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 8a7e3692257bc..52741201c50d8 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -155,7 +155,7 @@ ROOT_BUILD_OPTION(roofit_multiprocess OFF "Build RooFit::MultiProcess and multi- ROOT_BUILD_OPTION(root7 ON "Build ROOT 7 experimental components of ROOT") ROOT_BUILD_OPTION(runtime_cxxmodules ON "Enable runtime support for C++ modules") ROOT_BUILD_OPTION(shadowpw OFF "Enable support for shadow passwords") -ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible") +ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible (OFF not supported on Windows)") ROOT_BUILD_OPTION(soversion OFF "Set version number in sonames for shared libraries. Not recommended, as the pcm and rootmap files do not (yet) support versioning and always point to the non-versioned shared libraries.") ROOT_BUILD_OPTION(spectrum ON "Enable support for TSpectrum") ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite") diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index c0a2b1cb65eb7..2275c5746e8c3 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -7,8 +7,6 @@ #---------------------------------------------------------------------------- # macro ROOT_CHECK_CONNECTION(option) # Try to download a file to check internet connection. -# If fail-on-missing=ON is set, a failed connection check will cause a fatal -# configuration error. # Input variables: # option: # A hint to the user on which option to set to avoid the part of the @@ -44,10 +42,7 @@ macro(ROOT_CHECK_CONNECTION option) set(NO_CONNECTION FALSE) else() # Error - if(fail-on-missing) - message(FATAL_ERROR "No internet connection. Please check your connection, set '-D${option}' or disable 'fail-on-missing' to automatically disable options requiring internet access. You can also bypass the connection check with -Dcheck_connection=OFF.") - endif() - message(STATUS "Checking internet connectivity - failed: will not automatically download external dependencies. You can bypass the connection check with -Dcheck_connection=OFF.") + message(WARNING "No internet connection. Please check your connection, set '-D${option}' or disable 'fail-on-missing' to automatically disable options requiring internet access. You can also bypass the connection check with -Dcheck_connection=OFF.") set(NO_CONNECTION TRUE) endif() endif() @@ -69,7 +64,12 @@ endmacro() # Building Clad requires an internet connection, if we're not side-loading the source directory if(clad AND NOT DEFINED CLAD_SOURCE_DIR) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("clad") + ROOT_CHECK_CONNECTION("clad") + if(NO_CONNECTION) + message(SEND_ERROR "No internet connection, check it or disable the 'clad' option") + list(APPEND MISSING_PACKAGES 'clad') + list(APPEND HOTFIX_BUILD_FLAGS '-Dclad=OFF') + endif() endif() #---Check for installed packages depending on the build options/components enabled -- @@ -265,7 +265,12 @@ if(NOT builtin_pcre) endif() if(mathmore OR (tmva-cpu AND use_gsl_cblas)) if(builtin_gsl) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_gsl") + ROOT_CHECK_CONNECTION("builtin_gsl") + if(NO_CONNECTION) + message(SEND_ERROR "No internet connection, check it or disable the 'builtin_gsl' option") + list(APPEND MISSING_PACKAGES 'GSL') + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_gsl=OFF') + endif() endif() message(STATUS "Looking for GSL") ROOT_FIND_REQUIRED_DEP(GSL builtin_gsl 1.10) @@ -295,6 +300,11 @@ if(NOT "${HOTFIX_BUILD_FLAGS}" STREQUAL "") message(FATAL_ERROR "${HOTFIX_BUILD_FLAGS_MESSAGE}") endif() +# Now that builtins have passed this synchronization point, let's collect in a second pass +# additional error messages that can appear when using contradictory flags +unset(MISSING_PACKAGES) +unset(HOTFIX_BUILD_FLAGS_MESSAGE) + #---On MacOSX, try to find frameworks after standard libraries or headers------------ set(CMAKE_FIND_FRAMEWORK LAST) @@ -302,6 +312,7 @@ set(CMAKE_FIND_FRAMEWORK LAST) if(NOT shared) if(WINDOWS) message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!") + list(APPEND HOTFIX_BUILD_FLAGS '-Dshared=ON') else() message("Preferring static libraries.") set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}") @@ -364,10 +375,13 @@ endif() # library is needed for builds on Apple with Cocoa graphics if(cocoa) if(APPLE) - set(x11 OFF CACHE BOOL "Disabled because cocoa requested (${x11_description})" FORCE) + if (x11) + message(SEND_ERROR "x11 (${x11_description}) and cocoa cannot be enabled simultaneously. Set -Dx11=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dx11=OFF') + endif() else() - message(STATUS "Cocoa option can only be enabled on MacOSX platform") - set(cocoa OFF CACHE BOOL "Disabled because only available on MacOSX (${cocoa_description})" FORCE) + message(SEND_ERROR "Cocoa option can only be enabled on MacOSX platform. Set -Dcocoa=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dcocoa=OFF') endif() endif() @@ -419,8 +433,8 @@ endif() #---Check for all kind of graphics includes needed by libAfterImage-------------------- if(asimage) if(NOT x11 AND NOT cocoa AND NOT WIN32) - message(STATUS "Switching off 'asimage' because neither 'x11' nor 'cocoa' are enabled") - set(asimage OFF CACHE BOOL "Disabled because neither x11 nor cocoa are enabled (${asimage_description})" FORCE) + message(SEND_ERROR "'asimage' needs either 'x11' or 'cocoa' enabled. Set -Dasimage=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dasimage=OFF') endif() endif() if(asimage) @@ -515,13 +529,12 @@ if(opengl OR cocoa) find_package(OpenGL) endif() if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND) - if(fail-on-missing) - message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required") - elseif(cocoa) - message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required for \"cocoa=ON\"") + if(cocoa AND NOT opengl) + message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required for \"cocoa=ON\". Set -Dcocoa=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dcocoa=OFF') else() - message(STATUS "OpenGL (with GLU) not found. Switching off opengl option") - set(opengl OFF CACHE BOOL "Disabled because OpenGL (with GLU) not found (${opengl_description})" FORCE) + message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required. Set -Dopengl=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dopengl=OFF') endif() endif() endif() @@ -529,8 +542,8 @@ endif() # in case when -Dall=ON -Dx11=OFF, we will just disable opengl. if(NOT WIN32 AND NOT APPLE) if(opengl AND NOT x11) - message(STATUS "OpenGL was disabled, since it is requires x11 on Linux") - set(opengl OFF CACHE BOOL "OpenGL requires x11" FORCE) + message(SEND_ERROR "OpenGL requires x11 on Linux, either disable opengl or set -Dx11=ON") + list(APPEND HOTFIX_BUILD_FLAGS '-Dx11=ON') endif() endif() # The opengl flag enables the graf3d features that depend on OpenGL, and these @@ -538,6 +551,7 @@ endif() # asimage is off. See also: https://github.com/root-project/root/issues/16250 if(opengl AND NOT asimage) message(SEND_ERROR "OpenGL features enabled with \"opengl=ON\" require \"asimage=ON\"") + list(APPEND HOTFIX_BUILD_FLAGS '-Dasimage=ON') endif() #---Check for gl2ps ------------------------------------------------------------------ @@ -550,7 +564,9 @@ if(gviz) message(STATUS "Looking for Graphviz") find_package(Graphviz) if(NOT GRAPHVIZ_FOUND) - message(SEND_ERROR "Graphviz libraries not found while -Dgviz=On.") + message(SEND_ERROR "Graphviz libraries not found while -Dgviz=ON. Install them on the system or set -Dgviz=OFF") + list(APPEND MISSING_PACKAGES 'Graphviz') + list(APPEND HOTFIX_BUILD_FLAGS '-Dgviz=OFF') endif() endif() @@ -559,12 +575,9 @@ if(xml) message(STATUS "Looking for LibXml2") find_package(LibXml2) if(NOT LIBXML2_FOUND) - if(fail-on-missing) - message(SEND_ERROR "LibXml2 libraries not while -Dxml=ON") - else() - message(STATUS "LibXml2 not found. Switching off xml option") - set(xml OFF CACHE BOOL "Disabled because LibXml2 not found (${xml_description})" FORCE) - endif() + message(SEND_ERROR "LibXml2 libraries not while -Dxml=ON. Install them on the system or set -Dxml=OFF") + list(APPEND MISSING_PACKAGES 'LibXml2') + list(APPEND HOTFIX_BUILD_FLAGS '-Dxml=OFF') endif() endif() @@ -578,7 +591,9 @@ if(fcgi) message(STATUS "Looking for FastCGI") find_package(FastCGI) if(NOT FASTCGI_FOUND) - message(SEND_ERROR "FastCGI library not found while -Dfcgi=On") + message(SEND_ERROR "FastCGI library not found while -Dfcgi=ON. Install it on the system or set -Dfcgi=OFF") + list(APPEND MISSING_PACKAGES 'FastCGI') + list(APPEND HOTFIX_BUILD_FLAGS '-Dfcgi=OFF') endif() endif() @@ -600,14 +615,16 @@ if(http AND NOT builtin_civetweb) if(COMPILE_RESULT) message(STATUS "Detected civetweb feature mask: ${CIVETWEB_FEATURES}") else() - message(FATAL_ERROR "Could not run civetweb features: ${BUILD_LOG}") + message(SEND_ERROR "Could not run civetweb features: ${BUILD_LOG}. Try fixing the install or use builtin_civetweb=ON or switch `-Dhttp=OFF`") + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') endif() math(EXPR CIVETWEB_HAS_WEBSOCKET "(${CIVETWEB_FEATURES} >> 4) & 0x1") math(EXPR CIVETWEB_HAS_ZLIB "(${CIVETWEB_FEATURES} >> 9) & 0x1") math(EXPR CIVETWEB_HAS_X_DOM_SOCKET "(${CIVETWEB_FEATURES} >> 11) & 0x1") message(STATUS "civetweb websocket ; zlib ; xdomsocket support: ${CIVETWEB_HAS_WEBSOCKET} ; ${CIVETWEB_HAS_ZLIB} ; ${CIVETWEB_HAS_X_DOM_SOCKET}") else() - message(FATAL_ERROR "Could not check for civetweb features: ${CIVETWEB_FEATURE_API_LOG}") + message(SEND_ERROR "Could not check for civetweb features: ${CIVETWEB_FEATURE_API_LOG}. Try fixing the install or use builtin_civetweb=ON") + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') endif() if(NOT "${CIVETWEB_HAS_WEBSOCKET}" STREQUAL "1" OR NOT "${CIVETWEB_HAS_ZLIB}" STREQUAL "1" OR NOT "${CIVETWEB_HAS_X_DOM_SOCKET}" STREQUAL "1") @@ -617,6 +634,7 @@ if(http AND NOT builtin_civetweb) unset(${var} CACHE) endforeach() message(SEND_ERROR "System-wide civetweb found but does not include websocket or zlib or xdomsocket components (-DCIVETWEB_ENABLE_WEBSOCKETS=ON -DCIVETWEB_ENABLE_ZLIB=ON -DCIVETWEB_ENABLE_X_DOM_SOCKET=ON). Set `-Dbuiltin_civetweb=ON` as workaround or switch `-Dhttp=OFF`.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') endif() endif() endif() @@ -629,12 +647,9 @@ if(sqlite) message(STATUS "Looking for SQLite") find_package(Sqlite) if(NOT SQLITE_FOUND) - if(fail-on-missing) - message(SEND_ERROR "SQLite libraries not found while -Dsqlite=ON") - else() - message(STATUS "SQLite not found. Switching off sqlite option") - set(sqlite OFF CACHE BOOL "Disabled because SQLite not found (${sqlite_description})" FORCE) - endif() + message(SEND_ERROR "SQLite libraries not found while -Dsqlite=ON. Install them on the system or set -Dsqlite=OFF") + list(APPEND MISSING_PACKAGES 'SQLite') + list(APPEND HOTFIX_BUILD_FLAGS '-Dsqlite=OFF') endif() endif() @@ -643,29 +658,45 @@ if(pythia8) message(STATUS "Looking for Pythia8") find_package(Pythia8) if(NOT PYTHIA8_FOUND) - message(SEND_ERROR "Pythia8 libraries not found while -Dpythia8=ON") + message(SEND_ERROR "Pythia8 libraries not found while -Dpythia8=ON. Install them on the system or set -Dpythia8=OFF") + list(APPEND MISSING_PACKAGES 'Pythia8') + list(APPEND HOTFIX_BUILD_FLAGS '-Dpythia8=OFF') endif() endif() #---Check for FFTW3------------------------------------------------------------------- if(builtin_fftw3) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_fftw3") + ROOT_CHECK_CONNECTION("builtin_fftw3") + if(NO_CONNECTION) + message(SEND_ERROR "No internet connection, check it or disable the 'builtin_fftw3' option") + list(APPEND MISSING_PACKAGES 'fftw3') + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_fftw3=OFF') + endif() endif() if(builtin_fftw3) add_subdirectory(builtins/fftw3) - set(fftw3 ON CACHE BOOL "Enabled because builtin_fftw3 requested (${fftw3_description})" FORCE) + if (NOT fftw3) + message(SEND_ERROR "builtin_fftw3=ON is incompatible with fftw3=OFF. Set -Dfftw3=ON") + list(APPEND HOTFIX_BUILD_FLAGS '-Dfftw3=ON') + endif() endif() #---Check for fitsio------------------------------------------------------------------- if(fitsio OR builtin_cfitsio) if(builtin_cfitsio) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_cfitsio") + ROOT_CHECK_CONNECTION("builtin_cfitsio") + if(NO_CONNECTION) + message(SEND_ERROR "No internet connection, check it or disable the 'builtin_cfitsio' option") + list(APPEND MISSING_PACKAGES 'CFITSIO') + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_cfitsio=OFF') + endif() endif() if(builtin_cfitsio) add_library(CFITSIO::CFITSIO STATIC IMPORTED GLOBAL) add_subdirectory(builtins/cfitsio) if(NOT fitsio) - set(fitsio ON CACHE BOOL "Enabled because builtin_cfitsio requested (${fitsio_description})" FORCE) + message(SEND_ERROR "builtin_cfitsio=ON is incompatible with fitsio=OFF. Set -Dfitsio=ON") + list(APPEND HOTFIX_BUILD_FLAGS '-Dfitsio=ON') endif() endif() endif() @@ -674,8 +705,8 @@ endif() if(shadowpw) if(NOT EXISTS /etc/shadow) #---TODO--The test always succeeds because the actual file is protected if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) - message(STATUS "Support Shadow password not found. Switching off shadowpw option") - set(shadowpw OFF CACHE BOOL "Disabled because /etc/shadow not found (${shadowpw_description})" FORCE) + message(SEND_ERROR "Support Shadow password not found. Switch off shadowpw option -Dshadowpw=OFF") + list(APPEND HOTFIX_BUILD_FLAGS '-Dshadowpw=OFF') endif() endif() endif() @@ -698,10 +729,14 @@ if(builtin_xrootd) ROOT_CHECK_CONNECTION("builtin_xrootd=OFF") if(NO_CONNECTION) message(SEND_ERROR "No internet connection. Please check your connection, or disable the 'builtin_xrootd'" - " option") + " option and 'xrootd' options.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=OFF -Dbuiltin_xrootd=OFF') endif() add_subdirectory(builtins/xrootd) - set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE) + if (NOT xrootd) + message(SEND_ERROR "builtin_xrootd=ON is incompatible with xrootd=OFF (${xrootd_description}). Set xrootd=ON") + list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=ON') + endif() endif() # Backward compatibility for XRootD (e.g. \"/usr/local/mpich\"). Or disable option 'mpi'") + list(APPEND MISSING_PACKAGES 'MPI') + list(APPEND HOTFIX_BUILD_FLAGS '-Dmpi=OFF') endif() endif() @@ -1065,19 +1124,26 @@ if (roofit_multiprocess) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE ${CMAKE_FIND_PACKAGE_PREFER_CONFIG}) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) - # The fail-on-missing branching is not implemented, and we always look for - # ZeroMQ and cppzmq with REQUIRED to fail configuration if not available. - # That's because the roofit_multiprocess option can only be deliberately - # enabled by the user with roofit_multiprocess=ON, in which case it would - # be frustrating to get it auto-disabled on missing dependencies. - find_package(ZeroMQ 4.3.5 REQUIRED) + # We always look for ZeroMQ and cppzmq with REQUIRED to fail configuration if not available. + find_package(ZeroMQ 4.3.5) + if (NOT ZeroMQ_FOUND) + message(SEND_ERROR "ZeroMQ not found. Install it or disable option 'roofit_multiprocess'") + list(APPEND MISSING_PACKAGES 'ZeroMQ') + list(APPEND HOTFIX_BUILD_FLAGS '-Droofit_multiprocess=OFF') + endif() # Reset default find_package mode set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ${CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE}) unset(CMAKE_FIND_PACKAGE_PREFER_CONFIG_ORIGINAL_VALUE) message(STATUS "Looking for ZeroMQ C++ bindings (cppzmq)") - find_package(cppzmq REQUIRED) + find_package(cppzmq) + if (NOT cppzmq_FOUND) + message(SEND_ERROR "cppzmq not found. Install it or disable option 'roofit_multiprocess'") + list(APPEND MISSING_PACKAGES 'cppzmq') + list(APPEND HOTFIX_BUILD_FLAGS '-Droofit_multiprocess=OFF') + endif() + endif (roofit_multiprocess) #---Check for googletest--------------------------------------------------------------- @@ -1085,10 +1151,8 @@ if (testing OR testsupport) if (builtin_gtest) ROOT_CHECK_CONNECTION("testing=OFF") if(NO_CONNECTION) - message(STATUS "No internet connection, disabling the 'testing', 'testsupport' and 'builtin_gtest' options") - set(testing OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - set(testsupport OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) - set(builtin_gtest OFF CACHE BOOL "Disabled because there is no internet connection" FORCE) + message(STATUS "No internet connection, check connection or disable the 'testing', 'testsupport' and 'builtin_gtest' options") + list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=OFF -Dtestsupport=OFF -Dbuiltin_gtest=OFF') else() add_subdirectory(builtins/gtest) endif() @@ -1099,7 +1163,9 @@ if (testing OR testsupport) # Verify that all GTest subcomponents are installed foreach(LIBNAME gtest_main gmock_main gtest gmock) if(NOT TARGET GTest::${LIBNAME} AND NOT TARGET ${LIBNAME}) - message(SEND_ERROR "Missing installation of GTest subcomponent ${LIBNAME}") + message(SEND_ERROR "Missing installation of GTest subcomponent ${LIBNAME}. Install it or disable testing and testsupport.") + list(APPEND MISSING_PACKAGES '${LIBNAME}') + list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=OFF -Dtestsupport=OFF -Dbuiltin_gtest=OFF') endif() endforeach() # Starting from cmake 3.23, the GTest targets will have stable names. @@ -1115,8 +1181,8 @@ endif() if(webgui AND NOT builtin_openui5) ROOT_CHECK_CONNECTION("builtin_openui5=ON") if(NO_CONNECTION) - message(STATUS "No internet connection, switching to 'builtin_openui5' option") - set(builtin_openui5 ON CACHE BOOL "Enabled because there is no internet connection" FORCE) + message(SEND_ERROR "No internet connection, check it or switch ON the 'builtin_openui5' option") + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_openui5=ON') endif() endif() @@ -1252,12 +1318,49 @@ endif() # Needed to run tests of the distributed RDataFrame module that use pyspark. # The functionality has been tested with pyspark 2.4 and above. if(test_distrdf_pyspark) - find_package(PySpark 2.4 REQUIRED) + find_package(PySpark 2.4) + if (NOT PySpark_FOUND) + message(SEND_ERROR "PySpark not found. Install it or disable option 'test_distrdf_pyspark'") + list(APPEND MISSING_PACKAGES 'PySpark') + list(APPEND HOTFIX_BUILD_FLAGS '-Dtest_distrdf_pyspark=OFF') + endif() endif() #------------------------------------------------------------------------------------ # Check if the dask package is installed on the system. # Needed to run tests of the distributed RDataFrame module that use dask. if(test_distrdf_dask) - find_package(Dask 2022.08.1 REQUIRED) + find_package(Dask 2022.08.1) + if (NOT Dask_FOUND) + message(SEND_ERROR "Dask not found. Install it or disable option 'test_distrdf_pyspark'") + list(APPEND MISSING_PACKAGES 'Dask') + list(APPEND HOTFIX_BUILD_FLAGS '-Dtest_distrdf_dask=OFF') + endif() +endif() + +if(webgui AND qt6web) + find_package(Qt6 COMPONENTS Core WebEngineCore WebEngineWidgets CONFIG) + if(NOT Qt6_FOUND) + message(SEND_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets), install missing packages on the system or disable option 'qt6web'") + list(APPEND MISSING_PACKAGES 'Qt6 WebEngineCore WebEngineWidgets') + list(APPEND HOTFIX_BUILD_FLAGS '-Dqt6web=OFF') + endif() +endif() + +if(NOT "${MISSING_PACKAGES}" STREQUAL "") + list(REMOVE_DUPLICATES MISSING_PACKAGES) + message(SEND_ERROR "The following packages need to be installed system-wide to build ROOT: ${MISSING_PACKAGES}") +endif() +if(NOT "${HOTFIX_BUILD_FLAGS}" STREQUAL "") + list(REMOVE_DUPLICATES HOTFIX_BUILD_FLAGS) + set(HOTFIX_BUILD_FLAGS_MESSAGE "Alternatively, a hotfix would be to add these flags to your CMake call:\n") + + foreach(_item IN LISTS HOTFIX_BUILD_FLAGS) + string(APPEND HOTFIX_BUILD_FLAGS_MESSAGE " ${_item} \\\n") + endforeach() + + # Remove final trailing backslash and newline + string(REGEX REPLACE "\\\\\n$" "" HOTFIX_BUILD_FLAGS_MESSAGE "${HOTFIX_BUILD_FLAGS_MESSAGE}") + + message(FATAL_ERROR "${HOTFIX_BUILD_FLAGS_MESSAGE}") endif() diff --git a/gui/qt6webdisplay/CMakeLists.txt b/gui/qt6webdisplay/CMakeLists.txt index c70ac93bb61cf..340240c399364 100644 --- a/gui/qt6webdisplay/CMakeLists.txt +++ b/gui/qt6webdisplay/CMakeLists.txt @@ -8,12 +8,6 @@ # CMakeLists.txt file for building ROOT gui/qt6webdisplay package ############################################################################ -find_package(Qt6 COMPONENTS Core WebEngineCore WebEngineWidgets CONFIG) - -if(NOT Qt6_FOUND) - message(SEND_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets), install missing packages on the system or disable option 'qt6web'") -endif() - set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) From 99e41329fa0f605a7e4a078bb3fc809408aea6dc Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 11:33:35 +0200 Subject: [PATCH 02/10] [CMake] Produce an error when cuda=On and no CUDA compiler can be found. When cuda=On, but no viable compiler can be found, CMake produces the hard-to-understand error: Cannot determine link language of RooBatchCompute_CUDA. by hageboeck, cherrypicked from https://github.com/root-project/root/pull/23091/commits --- cmake/modules/SearchInstalledSoftware.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 2275c5746e8c3..3f80bb03bad45 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -953,6 +953,13 @@ if(experimental_adaptivecpp) endif() endif() +#---ensure that the cuda option is sound +if(cuda AND NOT CMAKE_CUDA_COMPILER) + message(SEND_ERROR "-Dcuda=ON can't be built because CMAKE_CUDA_COMPILER='${CMAKE_CUDA_COMPILER}'! Install compiler or disable cuda option") + list(APPEND MISSING_PACKAGES 'CUDA') + list(APPEND HOTFIX_BUILD_FLAGS '-Dcuda=OFF') +endif() + #---Check for optional TMVA-SOFIE testing dependency (BLAS)------------------------------- # SOFIE itself has no external dependencies: ONNX models are read with a small # self-contained protobuf wire-format decoder (tmva/sofie_parsers/src/onnx.hxx). From a6e9e184ecb4c95f07deba59181e63df3683d3b1 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 11:53:09 +0200 Subject: [PATCH 03/10] [cmake] explicitly enable daos_mock since testing is used in global --- .github/workflows/root-ci-config/buildconfig/global.txt | 1 + .github/workflows/root-docs-ci.yml | 2 +- cmake/modules/RootBuildOptions.cmake | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index 7051228f34bf4..4471001011d2c 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -36,6 +36,7 @@ coverage=OFF cuda=OFF curl=ON daos=OFF +daos_mock=ON dataframe=ON davix=ON dcache=OFF diff --git a/.github/workflows/root-docs-ci.yml b/.github/workflows/root-docs-ci.yml index 1cd64060689c3..02421e4445a11 100644 --- a/.github/workflows/root-docs-ci.yml +++ b/.github/workflows/root-docs-ci.yml @@ -98,7 +98,7 @@ jobs: - name: Apply option overrides env: - OVERRIDES: "testing=Off roottest=Off" + OVERRIDES: "testing=Off roottest=Off daos_mock=Off" CONFIGFILE: '.github/workflows/root-ci-config/buildconfig/alma9.txt' shell: bash run: | diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 52741201c50d8..324e4a587b5c6 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -120,6 +120,7 @@ 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(curl ON "Enable support for HTTP(S) through libcurl") ROOT_BUILD_OPTION(daos OFF "Enable RNTuple support for Intel DAOS") +ROOT_BUILD_OPTION(daos_mock OFF "Use libdaos_mock for RNTuple, use only for testing. Mutually exclusive with daos") 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)") From 65c4cb50d0eae4bb28b9d6276caf62e5f06321d0 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 12:20:34 +0200 Subject: [PATCH 04/10] [ci] explicit build options to avoid contradictions --- .../root-ci-config/buildconfig/alma10-minimal-asan.txt | 1 + .github/workflows/root-ci-config/buildconfig/alma10-minimal.txt | 1 + .github/workflows/root-ci-config/buildconfig/windows10.txt | 1 + .github/workflows/root-ci.yml | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt index d9e43b53bbff4..f3145072ecbf7 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt @@ -4,6 +4,7 @@ asan=ON ccache=ON builtin_civetweb=ON builtin_vdt=ON +daos_mock=ON fail-on-missing=ON minimal=ON roottest=ON diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt index 972e8b6d27e27..eebec3b02395e 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt @@ -1,6 +1,7 @@ ccache=ON builtin_civetweb=ON builtin_vdt=ON +daos_mock=ON fail-on-missing=ON minimal=ON roottest=ON diff --git a/.github/workflows/root-ci-config/buildconfig/windows10.txt b/.github/workflows/root-ci-config/buildconfig/windows10.txt index eb33f67625d12..04127bcd889e0 100644 --- a/.github/workflows/root-ci-config/buildconfig/windows10.txt +++ b/.github/workflows/root-ci-config/buildconfig/windows10.txt @@ -19,6 +19,7 @@ builtin_xxhash=ON builtin_zlib=ON builtin_zstd=ON ccache=OFF +daos_mock=OFF davix=OFF fortran=OFF llvm13_broken_tests=OFF diff --git a/.github/workflows/root-ci.yml b/.github/workflows/root-ci.yml index a7820f201a3f4..30797b89a14e6 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -418,7 +418,7 @@ jobs: overrides: ["CMAKE_BUILD_TYPE=Debug"] - image: alma10 - image: ubuntu22 - overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"] + overrides: ["imt=Off", "tmva-cpu=OFF", "CMAKE_BUILD_TYPE=Debug"] - image: ubuntu2404 overrides: ["CMAKE_BUILD_TYPE=Debug"] - image: ubuntu2604 From 195baf753b964a1faa122f73a2355a5501e5291e Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 16:40:17 +0200 Subject: [PATCH 05/10] [cmake] also prevent touching cache within RootBuildOptions --- cmake/modules/RootBuildOptions.cmake | 41 +++++++++++++++++----------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 324e4a587b5c6..9f835159121d7 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -333,45 +333,54 @@ endif() #---Define at moment the options with the selected default values------------------------------ ROOT_APPLY_OPTIONS() -#---roottest option implies testing +#---roottest/rootbench options require testing and testsupport if(roottest OR rootbench) - set(testing ON CACHE BOOL "" FORCE) + if (NOT testing OR NOT testsupport) + message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON -Dtestsupport=ON)") + list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=ON') + list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') + endif() endif() -#---testing implies testsupport +#---testing requires testsupport if(testing) - set(testsupport ON CACHE BOOL "" FORCE) -endif() - -#---ensure that the cuda option is sound -if(cuda AND NOT CMAKE_CUDA_COMPILER) - message(FATAL_ERROR "Option cuda=On, but CMAKE_CUDA_COMPILER='${CMAKE_CUDA_COMPILER}'") + message(SEND_ERROR "-Dtesting=ON requires -Dtestsupport=ON)") + list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') endif() #---running HS3 test suite requires both testing and pyroot, but testing globally disables tests if(testing AND test_roofit_hs3testsuite AND NOT pyroot) - message(FATAL_ERROR "-Dtest_roofit_hs3testsuite=ON requires both -Dtesting=ON and -Dpyroot=ON)") + message(SEND_ERROR "-Dtest_roofit_hs3testsuite=ON requires both -Dtesting=ON and -Dpyroot=ON)") + list(APPEND HOTFIX_BUILD_FLAGS '-Dpyroot=ON') endif() if(unfold AND NOT xml) - message(STATUS "Cannot enable unfold without enabling xml: unfold is disabled.") - set(unfold OFF) + message(SEND_ERROR "Cannot enable unfold without enabling -Dxml=ON.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dxml=ON') endif() if (NOT builtin_cling) if (builtin_clang OR builtin_llvm) message(WARNING "No need to build internal llvm or clang. Consider turning builtin_clang=Off and builtin_llvm=Off") + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_clang=OFF') + list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_llvm=OFF') endif() endif(NOT builtin_cling) if(NOT http AND webgui) - message(WARNING "Cannot build WebGui components without HTTP: webgui is disabled.") - set(webgui OFF) + message(SEND_ERROR "Cannot build WebGui components without HTTP: enable -Dhttp=ON or set -Dwebgui=OFF.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dwebgui=OFF') endif() if(NOT webgui) - set(qt6web OFF CACHE BOOL "Disabled because webgui not build" FORCE) - set(cefweb OFF CACHE BOOL "Disabled because webgui not build" FORCE) + if(qt6web) + message(SEND_ERROR "Cannot build qt6web without webgui and http: enable -Dwebgui=ON -Dhttp=ON or set -Dqt6web=OFF.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dqt6web=OFF') + endif() + if(qt6web) + message(SEND_ERROR "Cannot build cefweb without webgui and http: enable -Dwebgui=ON -Dhttp=ON or set -Dcefweb=OFF.") + list(APPEND HOTFIX_BUILD_FLAGS '-Dcefweb=OFF') + endif() endif() #---Removed options------------------------------------------------------------ From 59dfd0d947598cf340dc0e6317cc20f39c8d16a4 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 18 Aug 2026 17:36:26 +0200 Subject: [PATCH 06/10] [ci] explicitly enable testsupport and fix typo and ifcheck --- .../root-ci-config/buildconfig/alma10-minimal-asan.txt | 1 + .../workflows/root-ci-config/buildconfig/alma10-minimal.txt | 1 + .github/workflows/root-ci-config/buildconfig/global.txt | 1 + .github/workflows/root-docs-ci.yml | 2 +- cmake/modules/RootBuildOptions.cmake | 6 ++++-- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt index f3145072ecbf7..4f6b8d62e0a0e 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt @@ -9,5 +9,6 @@ fail-on-missing=ON minimal=ON roottest=ON testing=ON +testsupport=ON LSAN_OPTIONS=verbosity=1:log_threads=1 ROOT_CTEST_CUSTOM_FLAGS="-E \(cppinterop-CppInterOpTest\|roottest-cling-specialobj-runf02$\|roottest-root-collection-DeleteWarning$\|roottest-root-io-evolution-fixarr2$\|roottest-root-meta-rlibmap$\|roottest-root-treeproxy-vectorint-vectorint$\)" diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt index eebec3b02395e..d0349c9dddb80 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt @@ -6,3 +6,4 @@ fail-on-missing=ON minimal=ON roottest=ON testing=ON +testsupport=ON diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index 4471001011d2c..5352d97c116b8 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -82,6 +82,7 @@ test_distrdf_pyspark=ON test_roofit_hs3testsuite=ON test_tmva_sofie=ON testing=ON +testsupport=ON tmva-cpu=ON tmva-gpu=OFF tmva-cudnn=OFF diff --git a/.github/workflows/root-docs-ci.yml b/.github/workflows/root-docs-ci.yml index 02421e4445a11..c0529c344d50c 100644 --- a/.github/workflows/root-docs-ci.yml +++ b/.github/workflows/root-docs-ci.yml @@ -98,7 +98,7 @@ jobs: - name: Apply option overrides env: - OVERRIDES: "testing=Off roottest=Off daos_mock=Off" + OVERRIDES: "testing=Off testsupport=OFF roottest=Off daos_mock=Off" CONFIGFILE: '.github/workflows/root-ci-config/buildconfig/alma9.txt' shell: bash run: | diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 9f835159121d7..1abecb29c50f6 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -336,7 +336,7 @@ ROOT_APPLY_OPTIONS() #---roottest/rootbench options require testing and testsupport if(roottest OR rootbench) if (NOT testing OR NOT testsupport) - message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON -Dtestsupport=ON)") + message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON -Dtestsupport=ON") list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=ON') list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') endif() @@ -344,8 +344,10 @@ endif() #---testing requires testsupport if(testing) - message(SEND_ERROR "-Dtesting=ON requires -Dtestsupport=ON)") + if (NOT testsupport) + message(SEND_ERROR "-Dtesting=ON requires -Dtestsupport=ON") list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') + endif() endif() #---running HS3 test suite requires both testing and pyroot, but testing globally disables tests From 17130657dee2efa59688a0e740b1be8adc06a6f8 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 19 Aug 2026 09:08:21 +0200 Subject: [PATCH 07/10] [cmake] rm superfluous single quotes in copy-pastable error message and split multioptions and fix conflicting ssl=OFF vs builtin_openssl=ON on macos hotfix help message --- cmake/modules/CheckCompiler.cmake | 2 +- cmake/modules/RootBuildOptions.cmake | 20 +-- cmake/modules/SearchInstalledSoftware.cmake | 162 +++++++++++--------- 3 files changed, 97 insertions(+), 87 deletions(-) diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake index 4aacde172ab4d..2590fba0da006 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -52,7 +52,7 @@ if(fortran) if(NOT CMAKE_Fortran_COMPILER) message(SEND_ERROR "No Fortran compiler found. Please make sure it's installed, or disable ROOT's Fortran features with '-Dfortran=OFF'") list(APPEND MISSING_PACKAGES 'gfortran') - list(APPEND HOTFIX_BUILD_FLAGS '-Dfortran=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dfortran=OFF) endif() else() set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 1abecb29c50f6..1e9042283fcf6 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -337,8 +337,8 @@ ROOT_APPLY_OPTIONS() if(roottest OR rootbench) if (NOT testing OR NOT testsupport) message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON -Dtestsupport=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=ON') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=ON) + list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=ON) endif() endif() @@ -346,42 +346,42 @@ endif() if(testing) if (NOT testsupport) message(SEND_ERROR "-Dtesting=ON requires -Dtestsupport=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtestsupport=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=ON) endif() endif() #---running HS3 test suite requires both testing and pyroot, but testing globally disables tests if(testing AND test_roofit_hs3testsuite AND NOT pyroot) message(SEND_ERROR "-Dtest_roofit_hs3testsuite=ON requires both -Dtesting=ON and -Dpyroot=ON)") - list(APPEND HOTFIX_BUILD_FLAGS '-Dpyroot=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dpyroot=ON) endif() if(unfold AND NOT xml) message(SEND_ERROR "Cannot enable unfold without enabling -Dxml=ON.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dxml=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dxml=ON) endif() if (NOT builtin_cling) if (builtin_clang OR builtin_llvm) message(WARNING "No need to build internal llvm or clang. Consider turning builtin_clang=Off and builtin_llvm=Off") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_clang=OFF') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_llvm=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_clang=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_llvm=OFF) endif() endif(NOT builtin_cling) if(NOT http AND webgui) message(SEND_ERROR "Cannot build WebGui components without HTTP: enable -Dhttp=ON or set -Dwebgui=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dwebgui=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dwebgui=OFF) endif() if(NOT webgui) if(qt6web) message(SEND_ERROR "Cannot build qt6web without webgui and http: enable -Dwebgui=ON -Dhttp=ON or set -Dqt6web=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dqt6web=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dqt6web=OFF) endif() if(qt6web) message(SEND_ERROR "Cannot build cefweb without webgui and http: enable -Dwebgui=ON -Dhttp=ON or set -Dcefweb=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dcefweb=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dcefweb=OFF) endif() endif() diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 3f80bb03bad45..14774cf9cb072 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -68,7 +68,7 @@ if(clad AND NOT DEFINED CLAD_SOURCE_DIR) if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check it or disable the 'clad' option") list(APPEND MISSING_PACKAGES 'clad') - list(APPEND HOTFIX_BUILD_FLAGS '-Dclad=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dclad=OFF) endif() endif() @@ -100,7 +100,7 @@ macro(ROOT_FIND_REQUIRED_DEP PACKAGE_NAME BUILTIN_CONFIG_OPTION) "Please install it in the system (preferred), set the corresponding CMake search variable, " "or opt in to downloading and auto-build it from externally provided source tarball using '-D${BUILTIN_CONFIG_OPTION}=ON'.") list(APPEND MISSING_PACKAGES ${PACKAGE_NAME}) - list(APPEND HOTFIX_BUILD_FLAGS '-D${BUILTIN_CONFIG_OPTION}=ON') + list(APPEND HOTFIX_BUILD_FLAGS -D${BUILTIN_CONFIG_OPTION}=ON) endif() endif() endmacro() @@ -143,7 +143,7 @@ if(opengl) ROOT_FIND_REQUIRED_DEP(FTGL builtin_ftgl) elseif(builtin_ftgl) message(SEND_ERROR "FTGL features enabled with \"builtin_ftgl=ON\" require \"opengl=ON\"") - list(APPEND HOTFIX_BUILD_FLAGS '-Dopengl=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dopengl=ON) endif() foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES VERSION) unset(OPENSSL_${suffix} CACHE) @@ -156,15 +156,15 @@ if(ssl) if(NOT OPENSSL_FOUND) message(SEND_ERROR "OpenSSL found but missing required component SSL. Install it on the system (preferred), or explicitly request the builtin version. Or turn off ssl option.") list(APPEND MISSING_PACKAGES 'OpenSSL') - list(APPEND HOTFIX_BUILD_FLAGS '-Dssl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openssl=ON) endif() else() ROOT_CHECK_CONNECTION("builtin_openssl=OFF") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, disable the 'ssl' and 'builtin_openssl' options") list(APPEND MISSING_PACKAGES 'OpenSSL') - list(APPEND HOTFIX_BUILD_FLAGS '-Dssl=OFF') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_openssl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dssl=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openssl=OFF) endif() endif() else() @@ -172,7 +172,7 @@ if(ssl) if(NOT OPENSSL_FOUND) message(SEND_ERROR "OpenSSL found but missing required component SSL. Install it on the system (preferred), or explicitly request the builtin version. Or turn off ssl option.") list(APPEND MISSING_PACKAGES 'OpenSSL') - list(APPEND HOTFIX_BUILD_FLAGS '-Dssl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dssl=OFF) endif() endif() endif() @@ -203,7 +203,7 @@ if(xrootd) # Must go after SSL if("${XROOTD_${component}_LIBRARIES}" STREQUAL "XROOTD_${component}_LIBRARIES-NOTFOUND") message(SEND_ERROR "XROOTD found but missing component ${component}. Install missing package on your system (preferred). " "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally; or turn off xrootd.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dxrootd=OFF) endif() endforeach() endif() @@ -212,12 +212,12 @@ endif() if(builtin_xrootd) if(NOT ssl AND NOT builtin_openssl) message(SEND_ERROR "Building XRootD ('builtin_xrootd'=On) requires ssl support.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dssl=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dssl=ON) endif() endif() if(xrootd AND NOT builtin_xrootd AND builtin_openssl) message(SEND_ERROR "Non-builtin XROOTD must not be used with builtin OpenSSL. If you want to use non-builtin XROOTD, please use the system OpenSSL") - list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dxrootd=OFF) endif() if(imt) ROOT_FIND_REQUIRED_DEP(TBB builtin_tbb 2020) @@ -234,12 +234,12 @@ if(imt) int main() { return 0; }" tbb_exception_result) if(NOT tbb_exception_result) message(SEND_ERROR "Found TBB uses tbb::captured_exception, not suitable for ROOT!, enable 'builtin_tbb' option or turn off 'imt'") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_tbb=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_tbb=ON) endif() endif() elseif(builtin_tbb) message(SEND_ERROR "TBB features enabled with \"builtin_tbb=ON\" require \"imt=ON\"") - list(APPEND HOTFIX_BUILD_FLAGS '-Dimt=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dimt=ON) endif() # Double package name call, needs special manual treatment, cannot call ROOT_FIND_REQUIRED_DEP: @@ -259,7 +259,7 @@ if(NOT builtin_pcre) "Please install it in the system (preferred), set the corresponding CMake search variable, " "or opt in to downloading and auto-build it from externally provided source tarball using '-Dbuiltin_pcre=ON'.") list(APPEND MISSING_PACKAGES PCRE2) - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_pcre=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_pcre=ON) endif() endif() endif() @@ -269,7 +269,7 @@ if(mathmore OR (tmva-cpu AND use_gsl_cblas)) if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check it or disable the 'builtin_gsl' option") list(APPEND MISSING_PACKAGES 'GSL') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_gsl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_gsl=OFF) endif() endif() message(STATUS "Looking for GSL") @@ -312,7 +312,7 @@ set(CMAKE_FIND_FRAMEWORK LAST) if(NOT shared) if(WINDOWS) message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!") - list(APPEND HOTFIX_BUILD_FLAGS '-Dshared=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dshared=ON) else() message("Preferring static libraries.") set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}") @@ -377,11 +377,11 @@ if(cocoa) if(APPLE) if (x11) message(SEND_ERROR "x11 (${x11_description}) and cocoa cannot be enabled simultaneously. Set -Dx11=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dx11=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dx11=OFF) endif() else() message(SEND_ERROR "Cocoa option can only be enabled on MacOSX platform. Set -Dcocoa=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dcocoa=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dcocoa=OFF) endif() endif() @@ -434,7 +434,7 @@ endif() if(asimage) if(NOT x11 AND NOT cocoa AND NOT WIN32) message(SEND_ERROR "'asimage' needs either 'x11' or 'cocoa' enabled. Set -Dasimage=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dasimage=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dasimage=OFF) endif() endif() if(asimage) @@ -531,10 +531,10 @@ if(opengl OR cocoa) if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND) if(cocoa AND NOT opengl) message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required for \"cocoa=ON\". Set -Dcocoa=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dcocoa=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dcocoa=OFF) else() message(SEND_ERROR "OpenGL package (with GLU) not found and opengl option required. Set -Dopengl=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dopengl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dopengl=OFF) endif() endif() endif() @@ -543,7 +543,7 @@ endif() if(NOT WIN32 AND NOT APPLE) if(opengl AND NOT x11) message(SEND_ERROR "OpenGL requires x11 on Linux, either disable opengl or set -Dx11=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dx11=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dx11=ON) endif() endif() # The opengl flag enables the graf3d features that depend on OpenGL, and these @@ -551,7 +551,7 @@ endif() # asimage is off. See also: https://github.com/root-project/root/issues/16250 if(opengl AND NOT asimage) message(SEND_ERROR "OpenGL features enabled with \"opengl=ON\" require \"asimage=ON\"") - list(APPEND HOTFIX_BUILD_FLAGS '-Dasimage=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dasimage=ON) endif() #---Check for gl2ps ------------------------------------------------------------------ @@ -566,7 +566,7 @@ if(gviz) if(NOT GRAPHVIZ_FOUND) message(SEND_ERROR "Graphviz libraries not found while -Dgviz=ON. Install them on the system or set -Dgviz=OFF") list(APPEND MISSING_PACKAGES 'Graphviz') - list(APPEND HOTFIX_BUILD_FLAGS '-Dgviz=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dgviz=OFF) endif() endif() @@ -577,7 +577,7 @@ if(xml) if(NOT LIBXML2_FOUND) message(SEND_ERROR "LibXml2 libraries not while -Dxml=ON. Install them on the system or set -Dxml=OFF") list(APPEND MISSING_PACKAGES 'LibXml2') - list(APPEND HOTFIX_BUILD_FLAGS '-Dxml=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dxml=OFF) endif() endif() @@ -593,7 +593,7 @@ if(fcgi) if(NOT FASTCGI_FOUND) message(SEND_ERROR "FastCGI library not found while -Dfcgi=ON. Install it on the system or set -Dfcgi=OFF") list(APPEND MISSING_PACKAGES 'FastCGI') - list(APPEND HOTFIX_BUILD_FLAGS '-Dfcgi=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dfcgi=OFF) endif() endif() @@ -616,7 +616,7 @@ if(http AND NOT builtin_civetweb) message(STATUS "Detected civetweb feature mask: ${CIVETWEB_FEATURES}") else() message(SEND_ERROR "Could not run civetweb features: ${BUILD_LOG}. Try fixing the install or use builtin_civetweb=ON or switch `-Dhttp=OFF`") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_civetweb=ON) endif() math(EXPR CIVETWEB_HAS_WEBSOCKET "(${CIVETWEB_FEATURES} >> 4) & 0x1") math(EXPR CIVETWEB_HAS_ZLIB "(${CIVETWEB_FEATURES} >> 9) & 0x1") @@ -624,7 +624,7 @@ if(http AND NOT builtin_civetweb) message(STATUS "civetweb websocket ; zlib ; xdomsocket support: ${CIVETWEB_HAS_WEBSOCKET} ; ${CIVETWEB_HAS_ZLIB} ; ${CIVETWEB_HAS_X_DOM_SOCKET}") else() message(SEND_ERROR "Could not check for civetweb features: ${CIVETWEB_FEATURE_API_LOG}. Try fixing the install or use builtin_civetweb=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_civetweb=ON) endif() if(NOT "${CIVETWEB_HAS_WEBSOCKET}" STREQUAL "1" OR NOT "${CIVETWEB_HAS_ZLIB}" STREQUAL "1" OR NOT "${CIVETWEB_HAS_X_DOM_SOCKET}" STREQUAL "1") @@ -634,7 +634,7 @@ if(http AND NOT builtin_civetweb) unset(${var} CACHE) endforeach() message(SEND_ERROR "System-wide civetweb found but does not include websocket or zlib or xdomsocket components (-DCIVETWEB_ENABLE_WEBSOCKETS=ON -DCIVETWEB_ENABLE_ZLIB=ON -DCIVETWEB_ENABLE_X_DOM_SOCKET=ON). Set `-Dbuiltin_civetweb=ON` as workaround or switch `-Dhttp=OFF`.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_civetweb=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_civetweb=ON) endif() endif() endif() @@ -649,7 +649,7 @@ if(sqlite) if(NOT SQLITE_FOUND) message(SEND_ERROR "SQLite libraries not found while -Dsqlite=ON. Install them on the system or set -Dsqlite=OFF") list(APPEND MISSING_PACKAGES 'SQLite') - list(APPEND HOTFIX_BUILD_FLAGS '-Dsqlite=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dsqlite=OFF) endif() endif() @@ -660,7 +660,7 @@ if(pythia8) if(NOT PYTHIA8_FOUND) message(SEND_ERROR "Pythia8 libraries not found while -Dpythia8=ON. Install them on the system or set -Dpythia8=OFF") list(APPEND MISSING_PACKAGES 'Pythia8') - list(APPEND HOTFIX_BUILD_FLAGS '-Dpythia8=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dpythia8=OFF) endif() endif() @@ -670,14 +670,14 @@ if(builtin_fftw3) if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check it or disable the 'builtin_fftw3' option") list(APPEND MISSING_PACKAGES 'fftw3') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_fftw3=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_fftw3=OFF) endif() endif() if(builtin_fftw3) add_subdirectory(builtins/fftw3) if (NOT fftw3) message(SEND_ERROR "builtin_fftw3=ON is incompatible with fftw3=OFF. Set -Dfftw3=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dfftw3=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dfftw3=ON) endif() endif() @@ -688,7 +688,7 @@ if(fitsio OR builtin_cfitsio) if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check it or disable the 'builtin_cfitsio' option") list(APPEND MISSING_PACKAGES 'CFITSIO') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_cfitsio=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_cfitsio=OFF) endif() endif() if(builtin_cfitsio) @@ -696,7 +696,7 @@ if(fitsio OR builtin_cfitsio) add_subdirectory(builtins/cfitsio) if(NOT fitsio) message(SEND_ERROR "builtin_cfitsio=ON is incompatible with fitsio=OFF. Set -Dfitsio=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dfitsio=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dfitsio=ON) endif() endif() endif() @@ -706,7 +706,7 @@ if(shadowpw) if(NOT EXISTS /etc/shadow) #---TODO--The test always succeeds because the actual file is protected if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) message(SEND_ERROR "Support Shadow password not found. Switch off shadowpw option -Dshadowpw=OFF") - list(APPEND HOTFIX_BUILD_FLAGS '-Dshadowpw=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dshadowpw=OFF) endif() endif() endif() @@ -730,12 +730,13 @@ if(builtin_xrootd) if(NO_CONNECTION) message(SEND_ERROR "No internet connection. Please check your connection, or disable the 'builtin_xrootd'" " option and 'xrootd' options.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=OFF -Dbuiltin_xrootd=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dxrootd=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_xrootd=OFF) endif() add_subdirectory(builtins/xrootd) if (NOT xrootd) message(SEND_ERROR "builtin_xrootd=ON is incompatible with xrootd=OFF (${xrootd_description}). Set xrootd=ON") - list(APPEND HOTFIX_BUILD_FLAGS '-Dxrootd=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dxrootd=ON) endif() endif() @@ -761,7 +762,7 @@ if(arrow) if(NOT ARROW_FOUND) message(SEND_ERROR "Apache Arrow not found but is required. Please set ARROW_ROOT to point to your Arrow installation, " "or include the installation of Arrow in the CMAKE_PREFIX_PATH. Or disable option 'arrow'.") - list(APPEND HOTFIX_BUILD_FLAGS '-Darrow=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Darrow=OFF) endif() endif() @@ -771,7 +772,7 @@ if(dcache) if(NOT DCAP_FOUND) message(SEND_ERROR "dCap library not found while -Ddcache=ON" " Set variable DCAP_ROOT to point to your dCache installation. Or disable option 'dcache'.") - list(APPEND HOTFIX_BUILD_FLAGS '-Ddcache=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Ddcache=OFF) endif() endif() @@ -798,7 +799,7 @@ if(davix) else() message(SEND_ERROR "Davix libraries (${davix_description}) not found while -Ddavix=ON. Install them on the system or set -Ddavix=OFF") list(APPEND MISSING_PACKAGES 'Davix') - list(APPEND HOTFIX_BUILD_FLAGS '-Ddavix=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Ddavix=OFF) endif() endif() @@ -821,7 +822,7 @@ if(curl) if(NOT CURL_FOUND) message(SEND_ERROR "libcurl not found (${curl_description}) and -Dcurl=ON option required. Install on the system or set -Dcurl=OFF.") list(APPEND MISSING_PACKAGES 'libcurl') - list(APPEND HOTFIX_BUILD_FLAGS '-Dcurl=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dcurl=OFF) endif() endif() @@ -829,24 +830,24 @@ endif() if (uring) if(NOT CMAKE_SYSTEM_NAME MATCHES Linux) message(SEND_ERROR "liburing only available on Linux but -During=ON option required. Set -During=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-During=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -During=OFF) else() message(STATUS "Looking for liburing") find_package(liburing) message(SEND_ERROR "liburing not found and -During=ON option required. Install on the system or set -During=OFF.") list(APPEND MISSING_PACKAGES 'liburing') - list(APPEND HOTFIX_BUILD_FLAGS '-During=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -During=OFF) endif() endif() #---Check for DAOS---------------------------------------------------------------- if (daos AND daos_mock) message(SEND_ERROR "Options `daos` and `daos_mock` are mutually exclusive; only one of them should be specified.") - list(APPEND HOTFIX_BUILD_FLAGS '-Ddaos=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Ddaos=OFF) endif() if (testing AND NOT daos AND NOT WIN32 AND NOT daos_mock) message(SEND_ERROR "`-Dtesting=ON` requires either `daos` or `daos_mock`.") - list(APPEND HOTFIX_BUILD_FLAGS '-Ddaos_mock=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Ddaos_mock=ON) endif() if (daos OR daos_mock) @@ -854,7 +855,8 @@ if (daos OR daos_mock) if(NOT libuuid_FOUND) message(SEND_ERROR "libuuid not found and it is required (daos or daos_mock option enabled). Install it on the system, or disable options 'daos' and 'daos_mock'") list(APPEND MISSING_PACKAGES 'libuuid') - list(APPEND HOTFIX_BUILD_FLAGS '-Ddaos=OFF -Ddaos_mock=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Ddaos=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Ddaos_mock=OFF) endif() endif() if (daos) @@ -862,7 +864,7 @@ if (daos) if(NOT DAOS_FOUND) message(SEND_ERROR "libdaos not found while -Ddaos=ON. Install it on the system, or disable option 'daos'") list(APPEND MISSING_PACKAGES 'DAOS') - list(APPEND HOTFIX_BUILD_FLAGS '-Ddaos=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Ddaos=OFF) endif() endif() @@ -879,7 +881,8 @@ if(builtin_tbb) ROOT_CHECK_CONNECTION("builtin_tbb=OFF") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check your connection or disable 'builtin_tbb' and 'imt' options") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_tbb=OFF -Dimt=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_tbb=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dimt=OFF) endif() endif() @@ -891,7 +894,8 @@ if(builtin_vdt) ROOT_CHECK_CONNECTION("builtin_vdt=OFF") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check your connection or disable 'builtin_vdt' and 'vdt' options") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_vdt=OFF -Dvdt=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_vdt=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dvdt=OFF) endif() endif() @@ -908,7 +912,7 @@ if (vecgeom) find_package(VecGeom 1.2 CONFIG) if(NOT VecGeom_FOUND) message(SEND_ERROR "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH, or disable 'vecgeom'") - list(APPEND HOTFIX_BUILD_FLAGS '-Dvecgeom=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dvecgeom=OFF) else() message(STATUS " Found VecGeom " ${VecGeom_VERSION}) endif() @@ -920,7 +924,7 @@ if(experimental_adaptivecpp) ROOT_CHECK_CONNECTION("experimental_adaptivecpp") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check your connection or disable 'experimental_adaptivecpp' option") - list(APPEND HOTFIX_BUILD_FLAGS '-Dexperimental_adaptivecpp=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dexperimental_adaptivecpp=OFF) endif() endif() include(SetupAdaptiveCpp) @@ -949,7 +953,7 @@ if(experimental_adaptivecpp) else() message(SEND_ERROR "AdaptiveCpp library not found, install it or disable 'experimental_adaptivecpp'") list(APPEND MISSING_PACKAGES 'AdaptiveCpp') - list(APPEND HOTFIX_BUILD_FLAGS '-Dexperimental_adaptivecpp=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dexperimental_adaptivecpp=OFF) endif() endif() @@ -957,7 +961,7 @@ endif() if(cuda AND NOT CMAKE_CUDA_COMPILER) message(SEND_ERROR "-Dcuda=ON can't be built because CMAKE_CUDA_COMPILER='${CMAKE_CUDA_COMPILER}'! Install compiler or disable cuda option") list(APPEND MISSING_PACKAGES 'CUDA') - list(APPEND HOTFIX_BUILD_FLAGS '-Dcuda=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dcuda=OFF) endif() #---Check for optional TMVA-SOFIE testing dependency (BLAS)------------------------------- @@ -970,7 +974,7 @@ if(tmva AND testing AND test_tmva_sofie) if(NOT BLAS_FOUND) message(SEND_ERROR "BLAS not found, but it's required for TMVA-SOFIE testing. Please install BLAS or configure with test_tmva_sofie=OFF") list(APPEND MISSING_PACKAGES 'BLAS') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtest_tmva_sofie=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtest_tmva_sofie=OFF) endif() endif() @@ -978,10 +982,10 @@ endif() if(tmva-cpu) if (NOT tmva) message(SEND_ERROR "-Dtmva-cpu=ON is incompatible with -Dtmva=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-cpu=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cpu=OFF) elseif(NOT imt) message(SEND_ERROR "-Dtmva-cpu=ON is incompatible with -Dimt=OFF.") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-cpu=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cpu=OFF) endif() endif() if(tmva-cpu) @@ -992,7 +996,7 @@ if(tmva-cpu) # use the GSL CBLAS. message(SEND_ERROR "Option tmva-cpu requires a BLAS library, but none could be found on the system. Either install a BLAS library like OpenBLAS (preferred), or set use_gsl_cblas=ON (possibly also builtin_gsl=ON if GSL not installed on the system). Or disable tmva-cpu.") list(APPEND MISSING_PACKAGES 'BLAS') - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_gsl=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_gsl=ON) endif() endif() endif() @@ -1003,7 +1007,9 @@ if(mathmore OR builtin_gsl OR (tmva-cpu AND use_gsl_cblas)) ROOT_CHECK_CONNECTION("builtin_gsl") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check your connection or disable 'builtin_gsl', 'tmva-cpu' and 'use_gsl_cblas' options") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_gsl=OFF -Dtmva-cpu=OFF -Duse_gsl_cblas=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_gsl=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cpu=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Duse_gsl_cblas=OFF) endif() endif() if(builtin_gsl) @@ -1029,14 +1035,14 @@ if(tmva-cpu) else() message(SEND_ERROR "tmva-cpu can't be built because BLAS was not found (${tmva-cpu_description})! Install it or disable tmva-cpu") list(APPEND MISSING_PACKAGES 'BLAS') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-cpu=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cpu=OFF) endif() endif() if(tmva) if(tmva-gpu AND NOT CMAKE_CUDA_COMPILER) message(SEND_ERROR "tmva-gpu can't be built because CUDA was not found! Install it or disable tmva-gpu") list(APPEND MISSING_PACKAGES 'CUDA') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-gpu=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-gpu=OFF) elseif(tmva-gpu) # So far, TMVA is the only package that uses the CUDA toolkit. RooFit is # just compiling libraries with the NVidia compiler itself. If more ROOT @@ -1055,7 +1061,7 @@ if(tmva) else() message(SEND_ERROR "cudnn not found while -Dtmva-cudnn=ON. Install it on the system, or disable option 'tmva-cudnn'") list(APPEND MISSING_PACKAGES 'CUDNN') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-cudnn=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cudnn=OFF) endif() endif() endif() @@ -1064,21 +1070,21 @@ if(tmva) message(SEND_ERROR "TMVA: numpy python package or Python development package not found and tmva-pymva component required" " (python executable: ${Python3_EXECUTABLE}). Install them or disable tmva-pymva.") list(APPEND MISSING_PACKAGES 'numpy') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-pymva=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-pymva=OFF) endif() endif() else() if (tmva-gpu) message(SEND_ERROR "'-Dtmva-gpu=ON' is incompatible with '-Dtmva=OFF' (${tmva-gpu_description})") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-gpu=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-gpu=OFF) endif() if (tmva-cudnn) message(SEND_ERROR "'-Dtmva-cudnn=ON' is incompatible with '-Dtmva=OFF' (${tmva-cudnn_description})") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-cudnn=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-cudnn=OFF) endif() if (tmva-pymva) message(SEND_ERROR "'-Dtmva-pymva=ON' is incompatible with '-Dtmva=OFF' (${tmva-pymva_description})") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtmva-pymva=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtmva-pymva=OFF) endif() endif(tmva) @@ -1091,7 +1097,7 @@ if(pyroot) message(SEND_ERROR "PyROOT: Python development package not found and pyroot component required" " (python executable: ${Python3_EXECUTABLE}). Install it or disable pyroot option.") list(APPEND MISSING_PACKAGES 'Python3_Development.Module') - list(APPEND HOTFIX_BUILD_FLAGS '-Dpyroot=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dpyroot=OFF) endif() endif() @@ -1103,7 +1109,7 @@ if(tpython) message(SEND_ERROR "TPython: Python development package not found and tpython component required" " (python executable: ${Python3_EXECUTABLE}). Install it or disable tpython option.") list(APPEND MISSING_PACKAGES 'Python3_Development') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtpython=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtpython=OFF) endif() endif() @@ -1116,7 +1122,7 @@ if (mpi) message(SEND_ERROR "MPI not found. Ensure that the installation of MPI is in the CMAKE_PREFIX_PATH." " Example: CMAKE_PREFIX_PATH= (e.g. \"/usr/local/mpich\"). Or disable option 'mpi'") list(APPEND MISSING_PACKAGES 'MPI') - list(APPEND HOTFIX_BUILD_FLAGS '-Dmpi=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dmpi=OFF) endif() endif() @@ -1136,7 +1142,7 @@ if (roofit_multiprocess) if (NOT ZeroMQ_FOUND) message(SEND_ERROR "ZeroMQ not found. Install it or disable option 'roofit_multiprocess'") list(APPEND MISSING_PACKAGES 'ZeroMQ') - list(APPEND HOTFIX_BUILD_FLAGS '-Droofit_multiprocess=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Droofit_multiprocess=OFF) endif() # Reset default find_package mode @@ -1148,7 +1154,7 @@ if (roofit_multiprocess) if (NOT cppzmq_FOUND) message(SEND_ERROR "cppzmq not found. Install it or disable option 'roofit_multiprocess'") list(APPEND MISSING_PACKAGES 'cppzmq') - list(APPEND HOTFIX_BUILD_FLAGS '-Droofit_multiprocess=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Droofit_multiprocess=OFF) endif() endif (roofit_multiprocess) @@ -1159,7 +1165,9 @@ if (testing OR testsupport) ROOT_CHECK_CONNECTION("testing=OFF") if(NO_CONNECTION) message(STATUS "No internet connection, check connection or disable the 'testing', 'testsupport' and 'builtin_gtest' options") - list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=OFF -Dtestsupport=OFF -Dbuiltin_gtest=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_gtest=OFF) else() add_subdirectory(builtins/gtest) endif() @@ -1172,7 +1180,9 @@ if (testing OR testsupport) if(NOT TARGET GTest::${LIBNAME} AND NOT TARGET ${LIBNAME}) message(SEND_ERROR "Missing installation of GTest subcomponent ${LIBNAME}. Install it or disable testing and testsupport.") list(APPEND MISSING_PACKAGES '${LIBNAME}') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtesting=OFF -Dtestsupport=OFF -Dbuiltin_gtest=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=OFF) + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_gtest=OFF) endif() endforeach() # Starting from cmake 3.23, the GTest targets will have stable names. @@ -1189,7 +1199,7 @@ if(webgui AND NOT builtin_openui5) ROOT_CHECK_CONNECTION("builtin_openui5=ON") if(NO_CONNECTION) message(SEND_ERROR "No internet connection, check it or switch ON the 'builtin_openui5' option") - list(APPEND HOTFIX_BUILD_FLAGS '-Dbuiltin_openui5=ON') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_openui5=ON) endif() endif() @@ -1329,7 +1339,7 @@ if(test_distrdf_pyspark) if (NOT PySpark_FOUND) message(SEND_ERROR "PySpark not found. Install it or disable option 'test_distrdf_pyspark'") list(APPEND MISSING_PACKAGES 'PySpark') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtest_distrdf_pyspark=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtest_distrdf_pyspark=OFF) endif() endif() @@ -1341,7 +1351,7 @@ if(test_distrdf_dask) if (NOT Dask_FOUND) message(SEND_ERROR "Dask not found. Install it or disable option 'test_distrdf_pyspark'") list(APPEND MISSING_PACKAGES 'Dask') - list(APPEND HOTFIX_BUILD_FLAGS '-Dtest_distrdf_dask=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dtest_distrdf_dask=OFF) endif() endif() @@ -1350,7 +1360,7 @@ if(webgui AND qt6web) if(NOT Qt6_FOUND) message(SEND_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets), install missing packages on the system or disable option 'qt6web'") list(APPEND MISSING_PACKAGES 'Qt6 WebEngineCore WebEngineWidgets') - list(APPEND HOTFIX_BUILD_FLAGS '-Dqt6web=OFF') + list(APPEND HOTFIX_BUILD_FLAGS -Dqt6web=OFF) endif() endif() From 79a1ca020f948196191049f8912bf2747459d745 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 19 Aug 2026 11:50:37 +0200 Subject: [PATCH 08/10] [cmake] make testing independent of (parallel to) testsupport Before, there was a subordinate hierarchical dependency, testing required testsupport. Now they have a logical OR relationship, GTest will be a dependency if one or the other is enabled. --- cmake/modules/RootBuildOptions.cmake | 17 ++++------------- core/testsupport/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 1e9042283fcf6..998265b2b860e 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -163,7 +163,7 @@ ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite") ROOT_BUILD_OPTION(ssl ON "Enable support for SSL encryption via OpenSSL") ROOT_BUILD_OPTION(test_distrdf_dask OFF "Enable distributed RDataFrame tests that use dask") ROOT_BUILD_OPTION(test_distrdf_pyspark OFF "Enable distributed RDataFrame tests that use pyspark") -ROOT_BUILD_OPTION(testsupport OFF "Build the ROOT::TestSupport library required to use all features of ROOT_ADD_GTEST and similar macros (requires gtest at build time)") +ROOT_BUILD_OPTION(testsupport OFF "Build the ROOT::TestSupport library required to use all features of ROOT_ADD_GTEST and similar macros (requires gtest at build time). If OFF, this library is still built if testing=ON") ROOT_BUILD_OPTION(thisroot_scripts ON "Build scripts like thisroot.{sh, fish, etc.} that set environment paths for using ROOT. Usually not needed when building ROOT for the distribution with a package manager.") ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library") ROOT_BUILD_OPTION(tmva-cpu ON "Build TMVA with CPU support for deep learning (requires BLAS)") @@ -333,20 +333,11 @@ endif() #---Define at moment the options with the selected default values------------------------------ ROOT_APPLY_OPTIONS() -#---roottest/rootbench options require testing and testsupport +#---roottest/rootbench options require testing if(roottest OR rootbench) - if (NOT testing OR NOT testsupport) - message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON -Dtestsupport=ON") + if (NOT testing) + message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON") list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=ON) - list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=ON) - endif() -endif() - -#---testing requires testsupport -if(testing) - if (NOT testsupport) - message(SEND_ERROR "-Dtesting=ON requires -Dtestsupport=ON") - list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=ON) endif() endif() diff --git a/core/testsupport/CMakeLists.txt b/core/testsupport/CMakeLists.txt index eaa1b032e0451..b001897a0986f 100644 --- a/core/testsupport/CMakeLists.txt +++ b/core/testsupport/CMakeLists.txt @@ -4,7 +4,7 @@ # higher than kInfo are issued by tests. # Stephan Hageboeck, CERN, 2022 -if(NOT testsupport) +if(NOT testsupport AND NOT testing) return() endif() From 39fe9efbbc4d13cccf98c484cafc7d05201e4a5c Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 19 Aug 2026 12:19:57 +0200 Subject: [PATCH 09/10] [ci] setting ON testsupport no longer needed --- .../root-ci-config/buildconfig/alma10-minimal-asan.txt | 1 - .../root-ci-config/buildconfig/alma10-minimal.txt | 1 - .github/workflows/root-ci-config/buildconfig/global.txt | 2 +- .github/workflows/root-docs-ci.yml | 2 +- cmake/modules/RootBuildOptions.cmake | 8 ++++---- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt index 4f6b8d62e0a0e..f3145072ecbf7 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt @@ -9,6 +9,5 @@ fail-on-missing=ON minimal=ON roottest=ON testing=ON -testsupport=ON LSAN_OPTIONS=verbosity=1:log_threads=1 ROOT_CTEST_CUSTOM_FLAGS="-E \(cppinterop-CppInterOpTest\|roottest-cling-specialobj-runf02$\|roottest-root-collection-DeleteWarning$\|roottest-root-io-evolution-fixarr2$\|roottest-root-meta-rlibmap$\|roottest-root-treeproxy-vectorint-vectorint$\)" diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt index d0349c9dddb80..eebec3b02395e 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt @@ -6,4 +6,3 @@ fail-on-missing=ON minimal=ON roottest=ON testing=ON -testsupport=ON diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index 5352d97c116b8..74bb7b6cfc7e3 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -82,7 +82,7 @@ test_distrdf_pyspark=ON test_roofit_hs3testsuite=ON test_tmva_sofie=ON testing=ON -testsupport=ON +testsupport=OFF tmva-cpu=ON tmva-gpu=OFF tmva-cudnn=OFF diff --git a/.github/workflows/root-docs-ci.yml b/.github/workflows/root-docs-ci.yml index c0529c344d50c..fa3f3864cf8bd 100644 --- a/.github/workflows/root-docs-ci.yml +++ b/.github/workflows/root-docs-ci.yml @@ -98,7 +98,7 @@ jobs: - name: Apply option overrides env: - OVERRIDES: "testing=Off testsupport=OFF roottest=Off daos_mock=Off" + OVERRIDES: "testing=Off", "roottest=Off", "daos_mock=Off" CONFIGFILE: '.github/workflows/root-ci-config/buildconfig/alma9.txt' shell: bash run: | diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 998265b2b860e..3e1c1dbf07307 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -163,7 +163,7 @@ ROOT_BUILD_OPTION(sqlite ON "Enable support for SQLite") ROOT_BUILD_OPTION(ssl ON "Enable support for SSL encryption via OpenSSL") ROOT_BUILD_OPTION(test_distrdf_dask OFF "Enable distributed RDataFrame tests that use dask") ROOT_BUILD_OPTION(test_distrdf_pyspark OFF "Enable distributed RDataFrame tests that use pyspark") -ROOT_BUILD_OPTION(testsupport OFF "Build the ROOT::TestSupport library required to use all features of ROOT_ADD_GTEST and similar macros (requires gtest at build time). If OFF, this library is still built if testing=ON") +ROOT_BUILD_OPTION(testsupport OFF "Build the ROOT::TestSupport library required to use ROOT_ADD_GTEST and similar macros by downstream users (requires gtest at build time). Even if OFF, this library is still built if testing=ON") ROOT_BUILD_OPTION(thisroot_scripts ON "Build scripts like thisroot.{sh, fish, etc.} that set environment paths for using ROOT. Usually not needed when building ROOT for the distribution with a package manager.") ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library") ROOT_BUILD_OPTION(tmva-cpu ON "Build TMVA with CPU support for deep learning (requires BLAS)") @@ -189,11 +189,11 @@ option(clingtest "Enable cling tests (Note: that this makes llvm/clang symbols v option(fail-on-missing "Fail at configure time if a required package cannot be found" OFF) option(gminimal "Enable only required options by default, but include X11/Cocoa" OFF) option(minimal "Enable only required options by default" OFF) -option(rootbench "Build rootbench if rootbench exists in root or if it is a sibling directory (implies testing=ON)" OFF) -option(roottest "Build roottest (implies testing=ON)" OFF) +option(rootbench "Build rootbench if rootbench exists in root or if it is a sibling directory (requires testing=ON)" OFF) +option(roottest "Build roottest (requires testing=ON)" OFF) option(test_roofit_hs3testsuite "Setup and use the HS3 conformance test suite (requires network)" OFF) option(test_tmva_sofie "Enable SOFIE tests (requires BLAS library that can be found with CMake's FindBLAS)" ON) -option(testing "Enable testing with CTest" OFF) +option(testing "Enable testing with CTest and GTest" OFF) option(asan "Build ROOT with address sanitizer instrumentation (see core/sanitizer for details)" OFF) option(_wheel_build "ROOT is being packaged as a wheel, do not install .dist-info metadata" OFF) From dbb14875fd3df838545576d85b80a61928cc6da8 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Wed, 19 Aug 2026 17:08:23 +0200 Subject: [PATCH 10/10] [cmake] clarify error message for each option as suggested by pcanal --- cmake/modules/RootBuildOptions.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 3e1c1dbf07307..c4c6515e56398 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -334,11 +334,13 @@ endif() ROOT_APPLY_OPTIONS() #---roottest/rootbench options require testing -if(roottest OR rootbench) - if (NOT testing) - message(SEND_ERROR "-Droottest=ON or -Drootbench=ON requires -Dtesting=ON") - list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=ON) - endif() +if (roottest AND NOT testing) + message(SEND_ERROR "-Droottest=ON requires -Dtesting=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=ON) +endif() +if (rootbench AND NOT testing) + message(SEND_ERROR "-Drootbench=ON requires -Dtesting=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dtesting=ON) endif() #---running HS3 test suite requires both testing and pyroot, but testing globally disables tests