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 769c7c1f6fe0f..a817bca7d60b0 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal-asan.txt @@ -3,7 +3,6 @@ CMAKE_CXX_FLAGS_DEBUG="-Og -g" asan=ON ccache=ON builtin_vdt=ON -fail-on-missing=ON minimal=ON roottest=ON testing=ON diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt index a05a0aea30429..c58c80e6d88de 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt @@ -1,6 +1,5 @@ ccache=ON builtin_vdt=ON -fail-on-missing=ON minimal=ON roottest=ON testing=ON diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index eafb656ada6f7..5227d677dd65f 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -40,7 +40,6 @@ davix=ON dcache=OFF dev=OFF distcc=OFF -fail-on-missing=ON fcgi=OFF fftw3=ON fitsio=ON diff --git a/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index e32453fdb1831..bda267b2f7c28 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -40,6 +40,7 @@ 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` is deprected in 6.42 (it has no effect, now the behavior will be as if it was always ON), and will be removed in 6.44. * 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/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index b1d52786f503f..0d2e5fe76f9e7 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -186,7 +186,6 @@ ROOT_BUILD_OPTION(xrootd ON "Enable support for XRootD file server and client") option(all "Enable all optional components by default" OFF) option(clingtest "Enable cling tests (Note: that this makes llvm/clang symbols visible in libCling)" OFF) -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) @@ -389,6 +388,13 @@ foreach(opt r) endif() endforeach() +if(DEFINED fail-on-missing) + message(DEPRECATION ">>> Option 'fail-on-missing' is deprecated and ignored." + " ROOT now behaves as if fail-on-missing was always ON." + " Using this option will result in configuration errors in ROOT 6.44." + "") # empty line at the end to make the deprecation message more visible +endif() + foreach(opt minuit2_mpi) if(${opt}) message(WARNING "The option '${opt}' can only be used to minimise thread-safe functions in Minuit2. It cannot be used for Histogram/Graph fitting and for RooFit. If you want to use Minuit2 with MPI support, it is better to build Minuit2 as a standalone library.") diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 0452a9d7a4dd7..32c923b9f050d 100644 --- a/cmake/modules/SearchInstalledSoftware.cmake +++ b/cmake/modules/SearchInstalledSoftware.cmake @@ -7,7 +7,7 @@ #---------------------------------------------------------------------------- # 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 +# A failed connection check will cause a fatal # configuration error. # Input variables: # option: @@ -44,10 +44,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(SEND_ERROR "No internet connection. Please check your connection, set '-D${option}' to automatically disable options requiring internet access. You can also bypass the connection check with -Dcheck_connection=OFF.") set(NO_CONNECTION TRUE) endif() endif() @@ -56,8 +53,7 @@ endmacro() #---------------------------------------------------------------------------- # macro ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION(option_name) -# Check internet connection. If no connection, either disable the option or -# stop the configuration with a FATAL_ERROR in case of fail-on-missing=ON. +# Check internet connection. If no connection, disable the option #---------------------------------------------------------------------------- macro(ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION option_name) ROOT_CHECK_CONNECTION("${option_name}=OFF") @@ -113,7 +109,6 @@ foreach(suffix FOUND INCLUDE_DIR LIBRARY LIBRARY_DEBUG LIBRARY_RELEASE LIBRARIES endforeach() # Request explicit user opt-in for required "easy to self-install" dependencies -# This purposely ignores the fail-on-missing=OFF behavior if(asimage) ROOT_FIND_REQUIRED_DEP(GIF builtin_gif) ROOT_FIND_REQUIRED_DEP(JPEG builtin_jpeg) @@ -181,19 +176,7 @@ endif() #---Check for nlohmann/json.hpp--------------------------------------------------------- if(NOT builtin_nlohmannjson) - message(STATUS "Looking for nlohmann/json.hpp") - if(fail-on-missing) - find_package(nlohmann_json 3.9 REQUIRED) - else() - find_package(nlohmann_json 3.9 QUIET) - if(nlohmann_json_FOUND) - get_target_property(_nlohmann_json_incl nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES) - message(STATUS "Found nlohmann/json.hpp in ${_nlohmann_json_incl} (found version ${nlohmann_json_VERSION})") - else() - message(STATUS "nlohmann/json.hpp not found. Switching on builtin_nlohmannjson option") - set(builtin_nlohmannjson ON CACHE BOOL "Enabled because nlohmann/json.hpp not found" FORCE) - endif() - endif() + ROOT_FIND_REQUIRED_DEP(nlohmann_json builtin_nlohmannjson 3.9) # ROOTEve wants to know if it comes with json_fwd.hpp: if(TARGET nlohmann_json::nlohmann_json) @@ -218,32 +201,13 @@ if(http AND NOT builtin_civetweb) set(civetweb_INCLUDE_DIR $ENV{CIVETWEB_SRC}/include) message(STATUS "Use civetweb ${civetweb_LIBRARIES} and ${civetweb_INCLUDE_DIR}") else() - if(fail-on-missing) - find_package(civetweb 1.15 REQUIRED) - else() - find_package(civetweb 1.15 QUIET) - if(civetweb_FOUND) - message(STATUS "Found civetweb version ${civetweb_VERSION}") - else() - message(STATUS "civetweb not found. Switching on builtin_civetweb option") - set(builtin_civetweb ON CACHE BOOL "Enabled because civetweb not found" FORCE) - endif() - endif() + ROOT_FIND_REQUIRED_DEP(civetweb builtin_civetweb 1.15) endif() endif() #---Check for Unuran ------------------------------------------------------------------ if(unuran AND NOT builtin_unuran) - message(STATUS "Looking for Unuran") - if(fail-on-missing) - find_Package(Unuran REQUIRED) - else() - find_Package(Unuran) - if(NOT UNURAN_FOUND) - message(STATUS "Unuran not found. Switching on builtin_unuran option") - set(builtin_unuran ON CACHE BOOL "Enabled because Unuran not found (${builtin_unuran_description})" FORCE) - endif() - endif() + ROOT_FIND_REQUIRED_DEP(Unuran builtin_unuran) endif() if (builtin_unuran) add_subdirectory(builtins/unuran) @@ -438,14 +402,7 @@ 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\"") - 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) - endif() + message(SEND_ERROR "OpenGL package (with GLU) not found and required for opengl or cocoa") endif() endif() # OpenGL should be working only with x11 (Linux), @@ -478,12 +435,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 package not found and gviz option required") endif() endif() @@ -492,12 +444,7 @@ if(xml) message(STATUS "Looking for LibXml2") 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)") - 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 found and they are required (xml option enabled)") endif() endif() @@ -507,25 +454,7 @@ foreach(suffix FOUND INCLUDE_DIR INCLUDE_DIRS LIBRARY LIBRARIES VERSION) endforeach() if(ssl AND NOT builtin_openssl) - if(fail-on-missing) - find_package(OpenSSL REQUIRED) - else() - find_package(OpenSSL COMPONENTS SSL) - if(NOT OPENSSL_FOUND) - if(NOT APPLE) # builtin OpenSSL is only supported on macOS - message(STATUS "Switching OFF 'ssl' option.") - set(ssl OFF CACHE BOOL "Disabled because OpenSSL not found and builtin version only works on macOS (${ssl_description})" FORCE) - else() - ROOT_CHECK_CONNECTION("ssl=OFF") - if(NO_CONNECTION) - message(STATUS "OpenSSL not found, and no internet connection. Disabling the 'ssl' option.") - set(ssl OFF CACHE BOOL "Disabled because ssl requested and OpenSSL not found (${builtin_openssl_description}) and there is no internet connection" FORCE) - else() - message(SEND_ERROR "OpenSSL required but not found. Install it on the system (preferred), or explicitly request the builtin version.") - endif() - endif() - endif() - endif() + find_package(OpenSSL REQUIRED COMPONENTS SSL) endif() if(builtin_openssl) @@ -544,12 +473,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 and they are required (fcgi option enabled)") endif() endif() @@ -558,12 +482,7 @@ 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 and they are required (sqlite option enabled)") - 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 and they are required (sqlite option enabled)") endif() endif() @@ -572,12 +491,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 and they are required (pythia8 option enabled)") endif() endif() @@ -587,20 +501,7 @@ endif() #---Check for FFTW3------------------------------------------------------------------- if(fftw3) - if(NOT builtin_fftw3) - message(STATUS "Looking for 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)") - 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'") - message(STATUS " For the time being switching OFF 'fftw3' option") - set(fftw3 OFF CACHE BOOL "Disabled because FFTW3 not found and builtin_fftw3 disabled (${fftw3_description})" FORCE) - endif() - endif() - endif() + ROOT_FIND_REQUIRED_DEP(FFTW builtin_fftw3) endif() if(builtin_fftw3) add_subdirectory(builtins/fftw3) @@ -617,17 +518,7 @@ if(fitsio OR builtin_cfitsio) add_subdirectory(builtins/cfitsio) set(fitsio ON CACHE BOOL "Enabled because builtin_cfitsio requested (${fitsio_description})" FORCE) else() - message(STATUS "Looking for CFITSIO") - if(fail-on-missing) - find_package(CFITSIO REQUIRED) - else() - find_package(CFITSIO) - if(NOT CFITSIO_FOUND) - message(STATUS "CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'") - message(STATUS " For the time being switching off 'fitsio' option") - set(fitsio OFF CACHE BOOL "Disabled because CFITSIO not found and builtin_cfitsio disabled (${fitsio_description})" FORCE) - endif() - endif() + ROOT_FIND_REQUIRED_DEP(CFITSIO builtin_cfitsio) endif() endif() @@ -651,20 +542,9 @@ if(xrootd AND NOT builtin_xrootd) message(STATUS "Looking for XROOTD") find_package(XRootD) if(NOT XROOTD_FOUND) - if(fail-on-missing) - message(SEND_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, " - "or include the installation of XROOTD in the CMAKE_PREFIX_PATH. " - "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally") - else() - ROOT_CHECK_CONNECTION("xrootd=OFF") - if(NO_CONNECTION) - message(FATAL_ERROR "No internet connection. Please check your connection, or either disable the 'builtin_xrootd'" - " option or the 'fail-on-missing' to automatically disable options requiring internet access") - else() - message(STATUS "XROOTD not found, enabling 'builtin_xrootd' option") - set(builtin_xrootd ON CACHE BOOL "Enabled because xrootd is enabled, but external xrootd was not found (${xrootd_description})" FORCE) - endif() - endif() + message(SEND_ERROR "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation, " + "or include the installation of XROOTD in the CMAKE_PREFIX_PATH. " + "Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally") else() # XROOTD was found. Check now for required components foreach (component CLIENT UTILS) # ROOT requires XrdCl and XrdUtils @@ -690,11 +570,11 @@ endif() if(builtin_xrootd) ROOT_CHECK_CONNECTION("builtin_xrootd=OFF") if(NO_CONNECTION) - message(FATAL_ERROR "No internet connection. Please check your connection, or either disable the 'builtin_xrootd'" - " option or the 'fail-on-missing' to automatically disable options requiring internet access") + message(SEND_ERROR "No internet connection. Please check your connection, or disable the 'builtin_xrootd'" + " option") endif() if(NOT ssl AND NOT builtin_openssl) - message(FATAL_ERROR "Building XRootD ('builtin_xrootd'=On) requires ssl support ('ssl' or 'builtin_openssl').") + message(SEND_ERROR "Building XRootD ('builtin_xrootd'=On) requires ssl support.") endif() add_subdirectory(builtins/xrootd) set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE) @@ -718,42 +598,23 @@ endif() #---make sure non-builtin xrootd is not using builtin_openssl----------- if(xrootd AND NOT builtin_xrootd AND builtin_openssl) - if(fail-on-missing) - 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") - else() - message(STATUS "Non-builtin XROOTD must not be used with builtin OpenSSL. Disabling the 'xrootd' option.") - set(xrootd OFF CACHE BOOL "Disabled because non-builtin xrootd cannot be used with builtin OpenSSL" FORCE) - endif() + 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") endif() #---Check for Apache Arrow 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. Please set ARROW_HOME to point to your Arrow installation, " + "or include the installation of Arrow in the CMAKE_PREFIX_PATH.") endif() - endif() #---Check for dCache------------------------------------------------------------------- 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 and is required (dcache option enabled)") endif() endif() @@ -778,17 +639,9 @@ if(davix) message(FATAL_ERROR "Davix is not supported on Windows") endif() - if(fail-on-missing) - find_package(Davix 0.6.4 REQUIRED) - if(DAVIX_VERSION VERSION_GREATER_EQUAL 0.6.8 AND DAVIX_VERSION VERSION_LESS 0.7.1) - message(WARNING "Davix versions 0.6.8 to 0.7.0 have a bug and do not work with ROOT, please upgrade to 0.7.1 or later.") - endif() - else() - find_package(Davix 0.6.4) - if(NOT DAVIX_FOUND) - message(STATUS "Davix not found. Switching off davix option") - set(davix OFF CACHE BOOL "Disabled because dependencies not found (${davix_description})" FORCE) - endif() + find_package(Davix 0.6.4 REQUIRED) + if(DAVIX_VERSION VERSION_GREATER_EQUAL 0.6.8 AND DAVIX_VERSION VERSION_LESS 0.7.1) + message(WARNING "Davix versions 0.6.8 to 0.7.0 have a bug and do not work with ROOT, please upgrade to 0.7.1 or later.") endif() endif() @@ -809,12 +662,7 @@ if(curl) endif() if(NOT CURL_FOUND) - if(fail-on-missing) - message(SEND_ERROR "libcurl not found and curl option required") - else() - message(STATUS "libcurl not found. Switching off curl option") - set(curl OFF CACHE BOOL "Disabled because libcurl was not found (${curl_description})" FORCE) - endif() + message(SEND_ERROR "libcurl not found and curl option required") endif() endif() @@ -827,12 +675,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") endif() endif() endif() @@ -846,43 +689,18 @@ 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() - endif() + message(STATUS "Looking for libuuid for daos or daos_mock") + find_package(libuuid REQUIRED) 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() - endif() + find_package(DAOS REQUIRED) endif() #---Check for TBB--------------------------------------------------------------------- if(imt AND NOT builtin_tbb) message(STATUS "Looking for TBB") - if(fail-on-missing) - find_package(TBB 2020 REQUIRED) - else() - find_package(TBB 2020) - if(NOT TBB_FOUND) - message(STATUS "TBB not found, enabling 'builtin_tbb' option") - set(builtin_tbb ON CACHE BOOL "Enabled because imt is enabled, but TBB was not found" FORCE) - endif() - endif() + ROOT_FIND_REQUIRED_DEP(TBB builtin_tbb 2020) # Check that the found TBB does not use captured exceptions. If the header # does not exist, assume that we have oneTBB newer than @@ -896,11 +714,7 @@ if(imt AND NOT builtin_tbb) #endif int main() { return 0; }" tbb_exception_result) if(NOT tbb_exception_result) - if(fail-on-missing) - message(SEND_ERROR "Found TBB uses tbb::captured_exception, not suitable for ROOT!") - endif() - message(STATUS "Found TBB uses tbb::captured_exception, enabling 'builtin_tbb' option") - set(builtin_tbb ON CACHE BOOL "Enabled because imt is enabled and found TBB is not suitable" FORCE) + message(SEND_ERROR "Found TBB uses tbb::captured_exception, not suitable for ROOT!, enable 'builtin_tbb' option") endif() endif() @@ -932,21 +746,7 @@ endif() if(vdt OR builtin_vdt) if(NOT builtin_vdt) message(STATUS "Looking for VDT") - find_package(Vdt 0.4) - if(NOT VDT_FOUND) - if(fail-on-missing) - message(SEND_ERROR "VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH") - else() - message(STATUS "VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH") - ROOT_CHECK_CONNECTION("vdt=OFF") - if(NO_CONNECTION) - set(vdt OFF CACHE BOOL "Disabled because not found and no internet connection" FORCE) - else() - message(STATUS " Switching ON 'builtin_vdt' option") - set(builtin_vdt ON CACHE BOOL "Enabled because external vdt not found (${vdt_description})" FORCE) - endif() - endif() - endif() + ROOT_FIND_REQUIRED_DEP(Vdt builtin_vdt 0.4) endif() if(builtin_vdt) add_subdirectory(builtins/vdt) @@ -957,15 +757,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 +793,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 +804,7 @@ 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() + message(SEND_ERROR "BLAS not found, but it's required for TMVA-SOFIE testing") endif() endif() message(STATUS "Looking for Protobuf") @@ -1030,28 +814,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 and they are required (tmva-sofie option enabled)") 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 (tmva-sofie option enabled)") endif() endif() endif() @@ -1070,14 +839,10 @@ if(tmva-cpu) find_package(BLAS) if(NOT BLAS_FOUND) # If no optimized BLAS library was found, we fall back to attempting to - # use the GSL CBLAS. If ROOT is built with fail-on-missing=ON, this + # use the GSL CBLAS. This # usually means that the user does not want us to change build flags # automatically, so we send an error. - if(fail-on-missing) - 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).") - else() - set(use_gsl_cblas ON CACHE BOOL "Auto-enabling GSL CBLAS for TMVA [GPL]" FORCE) - endif() + 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).") endif() endif() endif() @@ -1091,21 +856,8 @@ if(mathmore OR builtin_gsl OR (tmva-cpu AND use_gsl_cblas)) if(NOT builtin_gsl) find_package(GSL 1.10) if(NOT GSL_FOUND) - if(fail-on-missing) - message(SEND_ERROR "GSL package not found and 'mathmore' component is required ('fail-on-missing' enabled). " - "Alternatively, you can enable the option 'builtin_gsl' to build the GSL libraries internally.") - else() - message(STATUS "GSL not found. Set variable GSL_ROOT_DIR to point to your GSL installation") - message(STATUS " Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'") - if (mathmore) - message(STATUS " For the time being switching OFF 'mathmore' option") - set(mathmore OFF CACHE BOOL "Disable because builtin_gsl disabled and external GSL not found (${mathmore_description})" FORCE) - endif() - if (tmva-cpu AND use_gsl_cblas) - message(STATUS " For the time being switching OFF 'tmva-cpu' option") - set(tmva-cpu OFF CACHE BOOL "Disable because use_gsl_cblas enabled, builtin_gsl disabled and external GSL not found (${tmva-cpu_description})" FORCE) - endif() - endif() + message(SEND_ERROR "GSL package not found and 'mathmore' component is required. " + "Alternatively, you can enable the option 'builtin_gsl' to build the GSL libraries internally.") endif() else() add_subdirectory(builtins/gsl) @@ -1129,12 +881,7 @@ if(tmva-cpu) target_compile_definitions(Blas INTERFACE -DR__USE_CBLAS) target_link_libraries(Blas INTERFACE GSL::gslcblas) else() - if(fail-on-missing) - message(SEND_ERROR "tmva-cpu can't be built because BLAS was not found!") - else() - message(STATUS "tmva-cpu disabled because BLAS was not found") - set(tmva-cpu OFF CACHE BOOL "Disabled because BLAS was not found (${tmva-cpu_description})" FORCE) - endif() + message(SEND_ERROR "tmva-cpu can't be built because BLAS was not found!") endif() endif() if(tmva) @@ -1149,30 +896,20 @@ 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 REQUIRED) if (CUDNN_FOUND) message(STATUS "CuDNN library found: " ${CUDNN_LIBRARIES}) # Once proper cuDNN support in CMake, replace this with an alias target: add_library(ROOT::cuDNN SHARED IMPORTED) 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) 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() @@ -1187,13 +924,8 @@ if(pyroot) if(Python3_Development.Module_FOUND) message(STATUS "PyROOT: development package found. Building for version ${Python3_VERSION}") else() - if(fail-on-missing) - message(SEND_ERROR "PyROOT: Python development package not found and pyroot component required" - " (python executable: ${Python3_EXECUTABLE})") - else() - message(STATUS "PyROOT: Python development package not found for python ${Python3_EXECUTABLE}. Switching off pyroot option") - set(pyroot OFF CACHE BOOL "Disabled because Python development package was not found for ${Python3_EXECUTABLE}" FORCE) - endif() + message(SEND_ERROR "PyROOT: Python development package not found and pyroot component required" + " (python executable: ${Python3_EXECUTABLE})") endif() endif() @@ -1202,13 +934,8 @@ endif() if(tpython) if(NOT Python3_Development_FOUND) - if(fail-on-missing) - message(SEND_ERROR "TPython: Python development package not found and tpython component required" + message(SEND_ERROR "TPython: Python development package not found and tpython component required" " (python executable: ${Python3_EXECUTABLE})") - else() - message(STATUS "TPython: Python development package not found for python ${Python3_EXECUTABLE}. Switching off tpython option") - set(tpython OFF CACHE BOOL "Disabled because Python development package was not found for ${Python3_EXECUTABLE}" FORCE) - endif() endif() endif() @@ -1218,15 +945,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() @@ -1241,7 +961,7 @@ 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 + # 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 diff --git a/gui/qt6webdisplay/CMakeLists.txt b/gui/qt6webdisplay/CMakeLists.txt index f6769c717a19d..826e7793c880e 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(FATAL_ERROR "Could NOT find Qt6 (WebEngineCore, WebEngineWidgets), install missing packages on the system or disable option 'qt6web'") endif() set(CMAKE_AUTOMOC ON) diff --git a/pyproject.toml b/pyproject.toml index ccb3c0d861cfa..446900112766f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,6 @@ gminimal="ON" asimage="ON" opengl="OFF" runtime_cxxmodules="ON" -fail-on-missing="ON" # Prevent CMake from producing its own .dist-info metadata _wheel_build="ON"