Fix build with --disable-opencl
Change-Id: Ib97d303ce7d03df237d78175f0c32ed466fdfa2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183039 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194811 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
committed by
Caolán McNamara
parent
d8844ef1f0
commit
aa842cdc48
@@ -7,6 +7,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include <config_feature_opencl.h>
|
||||
|
||||
#include "qahelper.hxx"
|
||||
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
|
||||
#include <comphelper/propertysequence.hxx>
|
||||
@@ -687,6 +689,8 @@ void ScModelTestBase::miscRowHeightsTest( TestParam const * aTestValues, unsigne
|
||||
}
|
||||
}
|
||||
|
||||
#if HAVE_FEATURE_OPENCL
|
||||
|
||||
void ScModelTestBase::enableOpenCL()
|
||||
{
|
||||
/**
|
||||
@@ -701,7 +705,9 @@ void ScModelTestBase::disableOpenCL()
|
||||
sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly();
|
||||
}
|
||||
|
||||
void ScModelTestBase::initTestEnv(std::u16string_view fileName)
|
||||
#endif
|
||||
|
||||
void ScModelTestBase::initTestEnv([[maybe_unused]] std::u16string_view fileName)
|
||||
{
|
||||
// Some documents contain macros, disable them, otherwise
|
||||
// the "Error, BASIC runtime error." dialog is prompted
|
||||
@@ -714,6 +720,7 @@ void ScModelTestBase::initTestEnv(std::u16string_view fileName)
|
||||
aMacroValue.State = beans::PropertyState_DIRECT_VALUE;
|
||||
args.push_back(aMacroValue);
|
||||
|
||||
#if HAVE_FEATURE_OPENCL
|
||||
disableOpenCL();
|
||||
CPPUNIT_ASSERT(!ScCalcConfig::isOpenCLEnabled());
|
||||
|
||||
@@ -734,6 +741,7 @@ void ScModelTestBase::initTestEnv(std::u16string_view fileName)
|
||||
// Check there are 2 documents
|
||||
uno::Reference<frame::XFrames> xFrames = mxDesktop->getFrames();
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xFrames->getCount());
|
||||
#endif // HAVE_FEATURE_OPENCL
|
||||
}
|
||||
|
||||
ScRange ScUcalcTestBase::insertRangeData(
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <config_feature_opencl.h>
|
||||
|
||||
#include "helper/qahelper.hxx"
|
||||
|
||||
@@ -58,7 +59,9 @@ void ScParallelismTest::setUp()
|
||||
{
|
||||
ScModelTestBase::setUp();
|
||||
|
||||
#if HAVE_FEATURE_OPENCL
|
||||
sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly();
|
||||
#endif
|
||||
|
||||
m_bThreadingFlagCfg = getThreadingFlag();
|
||||
if (!m_bThreadingFlagCfg)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <sal/config.h>
|
||||
#include <config_feature_opencl.h>
|
||||
|
||||
#include "helper/qahelper.hxx"
|
||||
|
||||
@@ -55,7 +56,9 @@ void ScParallelismTest::setUp()
|
||||
{
|
||||
ScUcalcTestBase::setUp();
|
||||
|
||||
#if HAVE_FEATURE_OPENCL
|
||||
sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly();
|
||||
#endif
|
||||
|
||||
m_bThreadingFlagCfg = getThreadingFlag();
|
||||
if (!m_bThreadingFlagCfg)
|
||||
|
||||
Reference in New Issue
Block a user