From 4230978afd15abc1c33282175eb8ef9fe441aa85 Mon Sep 17 00:00:00 2001 From: Stephan Hageboeck Date: Fri, 26 Jun 2026 15:33:50 +0200 Subject: [PATCH] [CMake] Fix build failure when root is configured with -Dtesting=Off. The addition of "test_roofit_hs3testsuite" broke all CI builds with -Dtesting=Off (e.g. the doxygen builds), because test_roofit_hs3testsuite=On and testing=Off triggers a FATAL_ERROR. Here, we make testing=Off into a global switch that has precedence over test_roofit_hs3testsuite=On. --- cmake/modules/RootBuildOptions.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake index 776626e82abce..192f77d7fa860 100644 --- a/cmake/modules/RootBuildOptions.cmake +++ b/cmake/modules/RootBuildOptions.cmake @@ -339,9 +339,9 @@ if(testing) set(testsupport ON CACHE BOOL "" FORCE) endif() -#---running HS3 test suite requires both testing and pyroot -if(test_roofit_hs3testsuite AND (NOT testing OR NOT pyroot)) - message(FATAL_ERROR "-Dtest_roofit_hs3testsuite=ON requires both -Dtesting=ON and -Dpyroot=ON)") +#---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)") endif() if(unfold AND NOT xml)