From 4e1f2ed7eb8b7dafe27164ba61cdfaf21eba0104 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 17 May 2026 15:28:24 +0200 Subject: [PATCH] sc: only build the opencl CppunitTests when OPENCL is in BUILD_TYPE opencl-test-1.cxx and opencl-test-2.cxx call ScModelTestBase::enableOpenCL() and disableOpenCL() unconditionally, but those helpers in qahelper.cxx are wrapped in #if HAVE_FEATURE_OPENCL. configure.ac adds OPENCL to BUILD_TYPE and defines HAVE_FEATURE_OPENCL together, so without OPENCL the link fails with unresolved externals on test_sc_opencl-1.dll (seen on the Windows app build). Gate the two tests on OPENCL via gb_Helper_optional, matching the pattern already used for Package_opencl in the same file. Signed-off-by: Andras Timar Change-Id: I4fc9572f98c9b4bbbaab81fad7dc28780ef37397 (cherry picked from commit 36e32e6126e761af9fa7689cc9c1e59aa8b9c46e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206655 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sc/Module_sc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 75cc2075686e..1e79930f178b 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -256,8 +256,8 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\ JunitTest_sc_unoapi_4 \ JunitTest_sc_unoapi_6 \ JunitTest_sc_unoapi_7 \ - CppunitTest_sc_opencl-1 \ - CppunitTest_sc_opencl-2 \ + $(call gb_Helper_optional,OPENCL,CppunitTest_sc_opencl-1) \ + $(call gb_Helper_optional,OPENCL,CppunitTest_sc_opencl-2) \ )) $(eval $(call gb_Module_add_perfcheck_targets,sc,\