sc/Library_sc.mk | 4 ++-- sc/source/core/tool/formulagroup.cxx | 3 ++- sc/source/core/tool/formulaopt.cxx | 3 ++- sc/source/ui/unoobj/docuno.cxx | 12 ++++++++++++ 4 files changed, 18 insertions(+), 4 deletions(-)
New commits: commit 48abd594bbdbbece71200e64a8bdb2852f23a91d Author: Tor Lillqvist <t...@collabora.com> Date: Thu Nov 27 14:16:36 2014 +0200 Fix OpenCL-less build harder Change-Id: I1627f534505c735455c50f9b4f6e4d1c698ab9d2 diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 3ad559f..31643f8 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -661,8 +661,8 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/xmlsource/xmlsourcedlg \ )) -$(call gb_Helper_optional,OPENCL,\ -$(eval $(call gb_Library_add_exception_objects,sc,\ +$(eval $(call gb_Helper_optional,OPENCL,\ +$(call gb_Library_add_exception_objects,sc,\ sc/source/core/opencl/formulagroupcl \ sc/source/core/opencl/openclwrapper \ sc/source/core/opencl/opencl_device \ diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 705029b..328e3c3 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -523,10 +523,11 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() if ( !msInstance ) { +#if HAVE_FEATURE_OPENCL const ScCalcConfig& rConfig = ScInterpreter::GetGlobalConfig(); if (officecfg::Office::Common::Misc::UseOpenCL::get()) switchOpenCLDevice(rConfig.maOpenCLDevice, rConfig.mbOpenCLAutoSelect, false); - +#endif if ( !msInstance ) // software fallback { SAL_INFO("sc.formulagroup", "Create S/W interpreter"); diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index b0f76c8..60378df 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -649,10 +649,11 @@ void ScFormulaCfg::Commit() break; } } +#if HAVE_FEATURE_OPENCL if(bSetOpenCL) sc::FormulaGroupInterpreter::switchOpenCLDevice( GetCalcConfig().maOpenCLDevice, GetCalcConfig().mbOpenCLAutoSelect); - +#endif PutProperties(aNames, aValues); } diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a4de29c..bf89e00 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2353,7 +2353,11 @@ void ScModelObj::enableAutomaticDeviceSelection(sal_Bool bForce) ScFormulaOptions aOptions = SC_MOD()->GetFormulaOptions(); aOptions.SetCalcConfig(aConfig); SC_MOD()->SetFormulaOptions(aOptions); +#if !HAVE_FEATURE_OPENCL + (void) bForce; +#else sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(), true, bForce); +#endif } void ScModelObj::disableAutomaticDeviceSelection() @@ -2392,19 +2396,27 @@ void ScModelObj::selectOpenCLDevice( sal_Int32 nPlatform, sal_Int32 nDevice ) sal_Int32 ScModelObj::getPlatformID() throw (uno::RuntimeException, std::exception) { +#if !HAVE_FEATURE_OPENCL + return -1; +#else sal_Int32 nPlatformId; sal_Int32 nDeviceId; sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId); return nPlatformId; +#endif } sal_Int32 ScModelObj::getDeviceID() throw (uno::RuntimeException, std::exception) { +#if !HAVE_FEATURE_OPENCL + return -1; +#else sal_Int32 nPlatformId; sal_Int32 nDeviceId; sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId); return nDeviceId; +#endif } uno::Sequence< sheet::opencl::OpenCLPlatform > ScModelObj::getOpenCLPlatforms() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits