diff --git a/.github/workflows/root-ci-config/buildconfig/alma10-asan.txt b/.github/workflows/root-ci-config/buildconfig/alma10-asan.txt index 65f3fd63f791a..c40f124e99c32 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-asan.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-asan.txt @@ -4,9 +4,11 @@ ccache=ON builtin_civetweb=ON builtin_vdt=ON ccache=ON +daos_mock=ON fail-on-missing=ON minimal=ON roottest=ON testing=ON +vdt=ON LSAN_OPTIONS=verbosity=1:log_threads=1 ROOT_CTEST_CUSTOM_FLAGS="-E \(gtest-core-metacling-TClingTest$\|roottest-cling-specialobj-runf02$\|roottest-root-collection-DeleteWarning$\|roottest-root-io-evolution-fixarr2$\|roottest-root-meta-rlibmap$\|roottest-root-tree-cloning-runtreeCloneTest2$\|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 972e8b6d27e27..58f9b4c8921b9 100644 --- a/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt +++ b/.github/workflows/root-ci-config/buildconfig/alma10-minimal.txt @@ -1,7 +1,9 @@ ccache=ON builtin_civetweb=ON builtin_vdt=ON +daos_mock=ON fail-on-missing=ON minimal=ON roottest=ON testing=ON +vdt=ON diff --git a/.github/workflows/root-ci-config/buildconfig/global.txt b/.github/workflows/root-ci-config/buildconfig/global.txt index 0d83e5d28d4e6..fd494342297de 100644 --- a/.github/workflows/root-ci-config/buildconfig/global.txt +++ b/.github/workflows/root-ci-config/buildconfig/global.txt @@ -38,6 +38,7 @@ coverage=OFF cuda=OFF curl=ON daos=OFF +daos_mock=ON dataframe=ON davix=ON dcache=OFF @@ -83,6 +84,7 @@ test_distrdf_pyspark=ON test_roofit_hs3testsuite=ON test_tmva_sofie=ON testing=ON +testsupport=OFF tmva-cpu=ON tmva-gpu=OFF tmva-cudnn=OFF 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 e6400a2d19e62..8c811f9a409a2 100644 --- a/.github/workflows/root-ci.yml +++ b/.github/workflows/root-ci.yml @@ -406,7 +406,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 diff --git a/.github/workflows/root-docs-ci.yml b/.github/workflows/root-docs-ci.yml index 1cd64060689c3..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 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/README/ReleaseNotes/v642/index.md b/README/ReleaseNotes/v642/index.md index 28bc71a175208..65481023d2642 100644 --- a/README/ReleaseNotes/v642/index.md +++ b/README/ReleaseNotes/v642/index.md @@ -45,6 +45,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..2590fba0da006 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 be3b19988076d..a23b44bc99c1c 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -122,6 +122,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)") @@ -157,14 +158,14 @@ 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") 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 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)") @@ -190,11 +191,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) @@ -309,6 +310,10 @@ if(roofit_multiprocess AND WIN32) message(FATAL_ERROR ">>> Option 'roofit_multiprocess' is not supported on Windows.") endif() +if(WIN32 AND NOT shared) + message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!") +endif() + #---Options depending of CMake Generator------------------------------------------------------- if( CMAKE_GENERATOR STREQUAL Ninja) set(fortran_defvalue OFF) @@ -336,45 +341,115 @@ endif() #---Define at moment the options with the selected default values------------------------------ ROOT_APPLY_OPTIONS() -#---roottest option implies testing -if(roottest OR rootbench) - set(testing ON CACHE BOOL "" FORCE) +# builtins require feature +if (builtin_fftw3 AND NOT fftw3) + message(SEND_ERROR "-Dbuiltin_fftw3=ON requires -Dfftw3=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dfftw3=ON) endif() - -#---testing implies testsupport -if(testing) - set(testsupport ON CACHE BOOL "" FORCE) +if (builtin_xrootd AND NOT xrootd) + message(SEND_ERROR "-Dbuiltin_xrootd=ON requires -Dxrootd=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dxrootd=ON) +endif() +if (builtin_cfitsio AND NOT fitsio) + message(SEND_ERROR "-Dbuiltin_cfitsio=ON requires -Dfitsio=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dfitsio=ON) +endif() +if (builtin_gl2ps AND NOT opengl) + message(SEND_ERROR "-Dbuiltin_gl2ps=ON requires -Dopengl=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dopengl=ON) +endif() +if (builtin_ftgl AND NOT opengl) + message(SEND_ERROR "-Dbuiltin_ftgl=ON requires -Dopengl=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dopengl=ON) +endif() +if (builtin_tbb AND NOT imt) + message(SEND_ERROR "-Dbuiltin_tbb=ON requires -Dimt=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dimt=ON) +endif() +if (builtin_vdt AND NOT vdt) + message(SEND_ERROR "-Dbuiltin_vdt=ON requires -Dvdt=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dvdt=ON) +endif() +if (builtin_gtest AND NOT (testing OR testsupport)) + message(SEND_ERROR "-Dbuiltin_gtest=ON requires -Dtesting=ON or -Dtestsupport=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dtestsupport=ON) +endif() +if(builtin_openui5 AND NOT webgui) + message(SEND_ERROR "-Dbuiltin_openui5=ON requires -Dwebgui=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dwebgui=ON) +endif() +if (builtin_openssl AND NOT ssl) + message(SEND_ERROR "-Dbuiltin_openssl=ON requires -Dssl=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dssl=ON) +endif() +# On Linux, OpenGL should be working only with x11 +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 -Dopengl=OFF) + endif() +endif() +#---Check for Cocoa/Quartz graphics backend (MacOS X only)--------------------------- +# Note that this check happens *after* the above check for FreeType because that +# library is needed for builds on Apple with Cocoa graphics +if(cocoa) + if(APPLE) + if (x11) + message(SEND_ERROR "x11 (${x11_description}) and cocoa cannot be enabled simultaneously. Set -Dcocoa=OFF") + list(APPEND HOTFIX_BUILD_FLAGS -Dcocoa=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) + endif() +elseif(asimage AND NOT x11 AND NOT WIN32) + message(SEND_ERROR "asimage on Unix requires x11, either disable asimage or set -Dx11=ON") + list(APPEND HOTFIX_BUILD_FLAGS -Dasimage=OFF) 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}'") +#---roottest/rootbench options require testing +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 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------------------------------------------------------------ diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake index 67aa8431fcaf4..b1c869755bbd1 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,11 @@ 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 HOTFIX_BUILD_FLAGS -Dclad=OFF) + endif() endif() #---Check for installed packages depending on the build options/components enabled -- @@ -100,7 +99,14 @@ 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() + else() + ROOT_CHECK_CONNECTION("${BUILTIN_CONFIG_OPTION}=ON") + if(NO_CONNECTION) + message(SEND_ERROR "No internet connection, check it or set -D${BUILTIN_CONFIG_OPTION}=OFF") + list(APPEND MISSING_PACKAGES '${PACKAGE_NAME}') + list(APPEND HOTFIX_BUILD_FLAGS -D${BUILTIN_CONFIG_OPTION}=OFF) endif() endif() endmacro() @@ -141,9 +147,6 @@ ROOT_FIND_REQUIRED_DEP(Freetype builtin_freetype) # needed for asimage, but also if(opengl) ROOT_FIND_REQUIRED_DEP(gl2ps builtin_gl2ps) 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') endif() if(webgui AND root7 AND geom) ROOT_FIND_REQUIRED_DEP(OpenGL builtin_glu) @@ -164,15 +167,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') - 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 -Dbuiltin_openssl=ON) endif() endif() else() @@ -180,7 +175,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() @@ -211,7 +206,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() @@ -220,12 +215,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) @@ -242,16 +237,18 @@ 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: -if(NOT builtin_pcre) +if(builtin_pcre) + ROOT_FIND_REQUIRED_DEP(PCRE2 builtin_pcre) +else() + # Double package name call, needs special manual treatment, cannot call ROOT_FIND_REQUIRED_DEP: message(STATUS "Looking for PCRE") # Clear cache before calling find_package(PCRE), # necessary to be able to toggle builtin_pcre and @@ -266,54 +263,25 @@ if(NOT builtin_pcre) message(SEND_ERROR "The required package PCRE2 was not found. " "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 MISSING_PACKAGES 'PCRE2') + list(APPEND HOTFIX_BUILD_FLAGS -Dbuiltin_pcre=ON) endif() endif() endif() if(mathmore OR (tmva-cpu AND use_gsl_cblas)) - if(builtin_gsl) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_gsl") - endif() - message(STATUS "Looking for GSL") ROOT_FIND_REQUIRED_DEP(GSL builtin_gsl 1.10) - if(NOT builtin_gsl) - if(NOT GSL_FOUND) - message(SEND_ERROR "GSL package not found and 'mathmore' or 'tmva-cpu' and 'use_gsl_cblas' component is required. Either disable those, or enable the option 'builtin_gsl'") - endif() + if(NOT builtin_gsl AND NOT GSL_FOUND) + message(SEND_ERROR "GSL package not found and 'mathmore' or 'tmva-cpu' and 'use_gsl_cblas' component requires it. Either disable those, or enable the option 'builtin_gsl'") 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() - #---On MacOSX, try to find frameworks after standard libraries or headers------------ set(CMAKE_FIND_FRAMEWORK LAST) #---If -Dshared=Off, prefer static libraries----------------------------------------- if(NOT shared) - if(WINDOWS) - message(FATAL_ERROR "Option \"shared=Off\" not supported on Windows!") - else() - message("Preferring static libraries.") - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}") - endif() + message("Preferring static libraries.") + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}") endif() #---Check for Zlib ------------------------------------------------------------------ @@ -367,18 +335,6 @@ elseif(NOT Freetype_VERSION AND FREETYPE_VERSION_STRING) set(Freetype_VERSION ${FREETYPE_VERSION_STRING}) endif() -#---Check for Cocoa/Quartz graphics backend (MacOS X only)--------------------------- -# Note that this check happens *after* the above check for FreeType because that -# 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) - 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) - endif() -endif() - #---Check for PCRE------------------------------------------------------------------- if(builtin_pcre) add_subdirectory(builtins/pcre) @@ -425,12 +381,6 @@ if(x11) 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) - endif() -endif() if(asimage) if(builtin_gif) @@ -523,29 +473,22 @@ 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() -# OpenGL should be working only with x11 (Linux), -# 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) - endif() -endif() + # The opengl flag enables the graf3d features that depend on OpenGL, and these # features also depend on asimage. Therefore, the configuration will fail if # 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 ------------------------------------------------------------------ @@ -563,7 +506,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() @@ -572,12 +517,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() @@ -591,7 +533,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() @@ -613,14 +557,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") @@ -630,6 +576,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() @@ -642,12 +589,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() @@ -656,39 +600,29 @@ 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") -endif() -if(builtin_fftw3) +if(fftw3 AND builtin_fftw3) add_subdirectory(builtins/fftw3) - set(fftw3 ON CACHE BOOL "Enabled because builtin_fftw3 requested (${fftw3_description})" FORCE) endif() #---Check for fitsio------------------------------------------------------------------- -if(fitsio OR builtin_cfitsio) - if(builtin_cfitsio) - ROOT_CHECK_CONNECTION_AND_DISABLE_OPTION("builtin_cfitsio") - 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) - endif() - endif() +if(fitsio AND builtin_cfitsio) + add_library(CFITSIO::CFITSIO STATIC IMPORTED GLOBAL) + add_subdirectory(builtins/cfitsio) endif() #---Check Shadow password support---------------------------------------------------- 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() @@ -707,14 +641,8 @@ if(xrootd AND NOT builtin_xrootd) endif() endif() -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") - endif() +if(xrootd AND builtin_xrootd) add_subdirectory(builtins/xrootd) - set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE) 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() @@ -1078,41 +1013,42 @@ 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--------------------------------------------------------------- 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) - else() - add_subdirectory(builtins/gtest) - endif() + add_subdirectory(builtins/gtest) endif() -endif() -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) + 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. @@ -1278,12 +1214,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, especially if you don't have Internet connection or admin rights, 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/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() 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) diff --git a/math/vecops/CMakeLists.txt b/math/vecops/CMakeLists.txt index f9623f1ea0be7..e61910878ec69 100644 --- a/math/vecops/CMakeLists.txt +++ b/math/vecops/CMakeLists.txt @@ -19,7 +19,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ROOTVecOps Core ) -if(builtin_vdt OR vdt) +if(vdt) target_link_libraries(ROOTVecOps PRIVATE VDT::VDT) endif() diff --git a/roofit/batchcompute/CMakeLists.txt b/roofit/batchcompute/CMakeLists.txt index ab87f98686df5..2e9056587b994 100644 --- a/roofit/batchcompute/CMakeLists.txt +++ b/roofit/batchcompute/CMakeLists.txt @@ -203,7 +203,7 @@ if (cuda) endif() endif() -if(vdt OR builtin_vdt) +if(vdt) foreach(library RooBatchCompute_GENERIC RooBatchCompute_SSE4.1 RooBatchCompute_AVX RooBatchCompute_AVX2 RooBatchCompute_AVX512 ) if(TARGET ${library}) target_link_libraries(${library} PRIVATE VDT::VDT)