diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-11-27 14:16:36 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-11-27 14:42:02 +0200 |
commit | 48abd594bbdbbece71200e64a8bdb2852f23a91d (patch) | |
tree | 85501ed50528bba39949e1e1152a7afaf426d063 | |
parent | 9a7653d09997d43a83efa5852bd7fce24da6e109 (diff) |
Fix OpenCL-less build harder
Change-Id: I1627f534505c735455c50f9b4f6e4d1c698ab9d2
-rw-r--r-- | sc/Library_sc.mk | 4 | ||||
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/formulaopt.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 12 |
4 files changed, 18 insertions, 4 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 3ad559fc0687..31643f8c139b 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 705029b89f13..328e3c3b0083 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 b0f76c86b048..60378df03122 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 a4de29cad0d4..bf89e009ae94 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() |