diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index e32453fdb1831..2db619e44337a 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -40,6 +40,9 @@ The following people have contributed to this new version: ## Deprecation and Removal * The build options `vc`, `veccore`, `builtin_vc`, `builtin_veccore` and `rpath` that were deprecated are now removed and will result in configuration errors if used. +* The option `fail-on-missing=OFF` is no longer honored for opt-in (ie OFF by default) build options requiring external dependencies such as `arrow`, `cocoa`, `daos`, `daos_mock`, `dcache`, `experimental_adaptivecpp`, `fcgi`, `fortran`, `gviz`, `mpi`, `pythia8`, `qt6web`, `tmva-cudnn`, `tmva-pymva`, `tmva-sofie`, `uring` or `vecgeom`. If the respective associated package dependency is not installed, ROOT will always raise a configuration error independent of the value of `fail-on-missing`. The user has to take action by either providing the dependency or manually disabling that option via `-Darrow=OFF`. + 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 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 b9a91d046f612..c09183ffed443 100644 --- a/cmake/modules/CheckCompiler.cmake +++ b/cmake/modules/CheckCompiler.cmake @@ -49,8 +49,8 @@ if(fortran) enable_language(Fortran) endif() endif() - if(NOT CMAKE_Fortran_COMPILER AND fail-on-missing) - message(FATAL_ERROR "No Fortran compiler found. Please make sure it's installed, or disable ROOT's Fortran features with '-Dfortran=OFF' (or set '-Dfail-on-missing=OFF' to automatically disable features with missing requirements)") + 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'") endif() else() set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND) diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 0452a9d7a4dd7..bf0d35d1835b5 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -478,12 +478,7 @@ if(gviz) message(STATUS "Looking for Graphviz") find_package(Graphviz) if(NOT GRAPHVIZ_FOUND) - if(fail-on-missing) - message(SEND_ERROR "Graphviz package not found and gviz option required") - else() - message(STATUS "Graphviz not found. Switching off gviz option") - set(gviz OFF CACHE BOOL "Disabled because Graphviz not found (${gviz_description})" FORCE) - endif() + message(SEND_ERROR "Graphviz libraries not found while -Dgviz=On.") endif() endif() @@ -493,7 +488,7 @@ if(xml) find_package(LibXml2) if(NOT LIBXML2_FOUND) if(fail-on-missing) - message(SEND_ERROR "LibXml2 libraries not found and they are required (xml option enabled)") + 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) @@ -544,12 +539,7 @@ if(fcgi) message(STATUS "Looking for FastCGI") find_package(FastCGI) if(NOT FASTCGI_FOUND) - if(fail-on-missing) - message(SEND_ERROR "FastCGI library not found and they are required (fcgi option enabled)") - else() - message(STATUS "FastCGI not found. Switching off fcgi option") - set(fcgi OFF CACHE BOOL "Disabled because FastCGI not found" FORCE) - endif() + message(SEND_ERROR "FastCGI library not found while -Dfcgi=On") endif() endif() @@ -559,7 +549,7 @@ if(sqlite) find_package(Sqlite) if(NOT SQLITE_FOUND) if(fail-on-missing) - message(SEND_ERROR "SQLite libraries not found and they are required (sqlite option enabled)") + 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) @@ -572,12 +562,7 @@ if(pythia8) message(STATUS "Looking for Pythia8") find_package(Pythia8) if(NOT PYTHIA8_FOUND) - if(fail-on-missing) - message(SEND_ERROR "Pythia8 libraries not found and they are required (pythia8 option enabled)") - else() - message(STATUS "Pythia8 not found. Switching off pythia8 option") - set(pythia8 OFF CACHE BOOL "Disabled because Pythia8 not found (${pythia8_description})" FORCE) - endif() + message(SEND_ERROR "Pythia8 libraries not found while -Dpythia8=ON") endif() endif() @@ -592,7 +577,7 @@ if(fftw3) find_package(FFTW) if(NOT FFTW_FOUND) if(fail-on-missing) - message(SEND_ERROR "FFTW3 libraries not found and they are required (fftw3 option enabled)") + message(SEND_ERROR "FFTW3 libraries not found while -Dfftw3=ON") else() message(STATUS "FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation") message(STATUS " Alternatively, you can also enable the option 'builtin_fftw3' to build FFTW3 internally'") @@ -730,15 +715,8 @@ endif() if(arrow) find_package(Arrow) if(NOT ARROW_FOUND) - if(fail-on-missing) - message(SEND_ERROR "Apache Arrow not found. Please set ARROW_HOME to point to your Arrow installation, " - "or include the installation of Arrow in the CMAKE_PREFIX_PATH.") - else() - message(STATUS "Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation, " - "or include the installation of Arrow in the CMAKE_PREFIX_PATH.") - message(STATUS "For the time being switching OFF 'arrow' option") - set(arrow OFF CACHE BOOL "Disabled because Apache Arrow API not found (${arrow_description})" FORCE) - endif() + 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'.") endif() endif() @@ -747,13 +725,8 @@ endif() if(dcache) find_package(DCAP) if(NOT DCAP_FOUND) - if(fail-on-missing) - message(SEND_ERROR "dCap library not found and is required (dcache option enabled)") - else() - message(STATUS "dCap library not found. Set variable DCAP_DIR to point to your dCache installation") - message(STATUS "For the time being switching OFF 'dcache' option") - set(dcache OFF CACHE BOOL "Disabled because dCap not found (${dcache_description})" FORCE) - endif() + message(SEND_ERROR "dCap library not found while -Ddcache=ON" + " Set variable DCAP_ROOT to point to your dCache installation. Or disable option 'dcache'.") endif() endif() @@ -827,12 +800,7 @@ if (uring) message(STATUS "Looking for liburing") find_package(liburing) if(NOT LIBURING_FOUND) - if(fail-on-missing) - message(SEND_ERROR "liburing not found and uring option required") - else() - message(STATUS "liburing not found. Switching off uring option") - set(uring OFF CACHE BOOL "Disabled because liburing was not found (${uring_description})" FORCE) - endif() + message(SEND_ERROR "liburing not found and uring option required. Install it on the system or disable option 'uring'.") endif() endif() endif() @@ -846,28 +814,15 @@ if (testing AND NOT daos AND NOT WIN32) endif() if (daos OR daos_mock) - message(STATUS "Looking for libuuid") - if(fail-on-missing) - find_package(libuuid REQUIRED) - else() - find_package(libuuid) - if(NOT libuuid_FOUND) - message(STATUS "libuuid not found. Disabling DAOS support") - set(daos OFF CACHE BOOL "Disabled (libuuid not found)" FORCE) - set(daos_mock OFF CACHE BOOL "Disabled (libuuid not found)" FORCE) - endif() + find_package(libuuid) + 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'") endif() endif() if (daos) - message(STATUS "Looking for DAOS") - if(fail-on-missing) - find_package(DAOS REQUIRED) - else() - find_package(DAOS) - if(NOT DAOS_FOUND) - message(STATUS "libdaos not found. Disabling DAOS support") - set(daos OFF CACHE BOOL "Disabled (libdaos not found)" FORCE) - endif() + find_package(DAOS) + if(NOT DAOS_FOUND) + message(SEND_ERROR "libdaos not found while -Ddaos=ON. Install it on the system, or disable option 'daos'") endif() endif() @@ -957,15 +912,8 @@ endif() if (vecgeom) message(STATUS "Looking for VecGeom") find_package(VecGeom 1.2 CONFIG) - if(NOT VecGeom_FOUND ) - if(fail-on-missing) - message(SEND_ERROR "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH") - else() - message(STATUS "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH") - message(STATUS " example: CMAKE_PREFIX_PATH=/lib/cmake/VecGeom") - message(STATUS " For the time being switching OFF 'vecgeom' option") - set(vecgeom OFF CACHE BOOL "Disabled because VecGeom not found (${vecgeom_description})" FORCE) - endif() + 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'") else() message(STATUS " Found VecGeom " ${VecGeom_VERSION}) endif() @@ -1000,12 +948,7 @@ if(experimental_adaptivecpp) endfunction() message(STATUS "AdaptiveCpp sycl enabled") else() - if(fail-on-missing) - message(FATAL_ERROR "AdaptiveCpp library not found") - else() - message(STATUS "AdaptiveCpp library not found") - set(sycl OFF CACHE BOOL "Disabled because no SYCL implementation is not found" FORCE) - endif() + message(SEND_ERROR "AdaptiveCpp library not found, install it or disable 'experimental_adaptivecpp'") endif() endif() @@ -1016,11 +959,9 @@ if(tmva-sofie) message(STATUS "Looking for BLAS as an optional testing dependency of TMVA-SOFIE") find_package(BLAS) if(NOT BLAS_FOUND) - if(fail-on-missing) - message(FATAL_ERROR "BLAS not found, but it's required for TMVA-SOFIE testing") - else() - message(WARNING "BLAS not found: TMVA-SOFIE will not be fully tested") - endif() + # BLAS only backs the TMVA-SOFIE tests, not the feature itself, so a + # missing BLAS must not turn into a configuration error. + message(WARNING "BLAS not found: TMVA-SOFIE will not be fully tested") endif() endif() message(STATUS "Looking for Protobuf") @@ -1030,28 +971,13 @@ if(tmva-sofie) find_package(Protobuf MODULE) endif() if(NOT Protobuf_FOUND) - if(fail-on-missing) - message(SEND_ERROR "Protobuf libraries not found and they are required (tmva-sofie option enabled)") - else() - message(STATUS "Protobuf not found. Switching off tmva-sofie option") - set(tmva-sofie OFF CACHE BOOL "Disabled because Protobuf not found" FORCE) - endif() + message(SEND_ERROR "Protobuf libraries not found while -Dtmva-sofie=ON") else() if(Protobuf_VERSION LESS 3.0) - if(fail-on-missing) - message(SEND_ERROR "Protobuf libraries found but is less than the version required (3.0) (tmva-sofie option enabled)") - else() - message(STATUS "Protobuf found but its version is not high enough (>3.0). Switching off tmva-sofie option") - set(tmva-sofie OFF CACHE BOOL "Disabled because found Protobuf version is not enough" FORCE) - endif() + message(SEND_ERROR "Protobuf libraries found but is less than the version required (3.0) (tmva-sofie option enabled)") else() if(NOT TARGET protobuf::protoc) - if(fail-on-missing) - message(SEND_ERROR "Protobuf compiler not found (tmva-sofie option enabled)") - else() - message(STATUS "Protobuf compiler not found. Switching off tmva-sofie option") - set(tmva-sofie OFF CACHE BOOL "Disabled because Protobuf compiler not found" FORCE) - endif() + message(SEND_ERROR "Protobuf compiler not found while -Dtmva-sofie=ON") endif() endif() endif() @@ -1149,11 +1075,7 @@ if(tmva) ### Look for package CuDNN. if (tmva-cudnn) - if (fail-on-missing) - find_package(CUDNN REQUIRED) - else() - find_package(CUDNN) - endif() + find_package(CUDNN) if (CUDNN_FOUND) message(STATUS "CuDNN library found: " ${CUDNN_LIBRARIES}) # Once proper cuDNN support in CMake, replace this with an alias target: @@ -1161,18 +1083,14 @@ if(tmva) set_property(TARGET ROOT::cuDNN PROPERTY IMPORTED_LOCATION ${CUDNN_LIBRARIES}) target_include_directories(ROOT::cuDNN INTERFACE ${CUDNN_INCLUDE_DIR}) else() - message(STATUS "CuDNN library not found") - set(tmva-cudnn OFF CACHE BOOL "Disabled because cuDNN not found" FORCE) + message(SEND_ERROR "cudnn not found while -Dtmva-cudnn=ON. Install it on the system, or disable option 'tmva-cudnn'") endif() endif() endif() if(tmva-pymva) - if(fail-on-missing AND (NOT Python3_NumPy_FOUND OR NOT Python3_Development_FOUND)) + if(NOT Python3_NumPy_FOUND OR NOT Python3_Development_FOUND) message(SEND_ERROR "TMVA: numpy python package or Python development package not found and tmva-pymva component required" " (python executable: ${Python3_EXECUTABLE})") - elseif(NOT Python3_NumPy_FOUND OR NOT Python3_Development_FOUND) - message(STATUS "TMVA: Numpy or Python development package not found for python ${Python3_EXECUTABLE}. Switching off tmva-pymva option") - set(tmva-pymva OFF CACHE BOOL "Disabled because Numpy or Python development package were not found (${tmva-pymva_description})" FORCE) endif() endif() else() @@ -1218,15 +1136,8 @@ if (mpi) message(STATUS "Looking for MPI") find_package(MPI) if(NOT MPI_FOUND) - if(fail-on-missing) - 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\")") - else() - message(STATUS "MPI not found. Ensure that the installation of MPI is in the CMAKE_PREFIX_PATH") - message(STATUS " Example: CMAKE_PREFIX_PATH= (e.g. \"/usr/local/mpich\")") - message(STATUS " For the time being switching OFF 'mpi' option") - set(mpi OFF CACHE BOOL "Disabled because MPI not found (${mpi_description})" FORCE) - endif() + 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'") endif() endif() diff --git a/gui/qt6webdisplay/CMakeLists.txt b/gui/qt6webdisplay/CMakeLists.txt index f6769c717a19d..c70ac93bb61cf 100644 --- a/gui/qt6webdisplay/CMakeLists.txt +++ b/gui/qt6webdisplay/CMakeLists.txt @@ -11,13 +11,7 @@ find_package(Qt6 COMPONENTS Core WebEngineCore WebEngineWidgets CONFIG) if(NOT Qt6_FOUND) - if(fail-on-missing) - message(FATAL_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets)") - else() - message(WARNING "Qt6 (WebEngineCore, WebEngineWidgets) not found, disabling option 'qt6web'") - set(qt6web OFF CACHE BOOL "Disabled because Qt6 not found" FORCE) - return() - endif() + message(SEND_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets), install missing packages on the system or disable option 'qt6web'") endif() set(CMAKE_AUTOMOC ON)