summaryrefslogtreecommitdiff
path: root/user/labplot/really-really-disable-liborigin.patch
blob: 6deb963c8b76023171a47cf7992bfcc59e682e78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
From 5e37796f4db1a2408fdd56562f0d80ef7988ff38 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Wed, 12 Sep 2018 12:02:44 -0500
Subject: [PATCH] Tests: disable Origin tests when lib is disabled

Compiling with liborigin disabled caused a build failure while building
ProjectImportTest, because it still unconditionally #included
OriginProjectParser and called into Origin code.
---
 tests/import_export/project/ProjectImportTest.cpp | 6 +++++-
 tests/import_export/project/ProjectImportTest.h   | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/import_export/project/ProjectImportTest.cpp b/tests/import_export/project/ProjectImportTest.cpp
index 11ac7845..91163b62 100755
--- a/tests/import_export/project/ProjectImportTest.cpp
+++ b/tests/import_export/project/ProjectImportTest.cpp
@@ -26,7 +26,9 @@
  ***************************************************************************/
 
 #include "ProjectImportTest.h"
-#include "backend/datasources/projects/OriginProjectParser.h"
+#ifdef HAVE_LIBORIGIN
+#  include "backend/datasources/projects/OriginProjectParser.h"
+#endif
 #include "backend/core/Project.h"
 #include "backend/core/Workbook.h"
 #include "backend/matrix/Matrix.h"
@@ -49,6 +51,7 @@ void ProjectImportTest::initTestCase() {
 //##############################################################################
 
 
+#ifdef HAVE_LIBORIGIN
 //##############################################################################
 //######################  import of Origin projects ############################
 //##############################################################################
@@ -375,5 +378,6 @@ void ProjectImportTest::testOriginTextNumericColumns() {
 	QCOMPARE(!std::isnan(column->valueAt(3)), false);
 	QCOMPARE(!std::isnan(column->valueAt(4)), false);
 }
+#endif
 
 QTEST_MAIN(ProjectImportTest)
diff --git a/tests/import_export/project/ProjectImportTest.h b/tests/import_export/project/ProjectImportTest.h
index 2e27bcd0..22b414a3 100755
--- a/tests/import_export/project/ProjectImportTest.h
+++ b/tests/import_export/project/ProjectImportTest.h
@@ -37,12 +37,14 @@ private slots:
 
 	//import of LabPlot projects
 
+#ifdef HAVE_LIBORIGIN
 	//import of Origin projects
 	void testOrigin01();
 	void testOrigin02();
 	void testOrigin03();
 	void testOrigin04();
 	void testOriginTextNumericColumns();
+#endif
 
 private:
 	QString m_dataDir;
-- 
2.18.0