Blame SOURCES/0294-Add-a-check-for-non-LIBO_INTERNAL_ONLY-C-03-compatib.patch

f325b2
From 2ad707f0ab106b238369f9810949f290ab6b9b89 Mon Sep 17 00:00:00 2001
f325b2
From: Stephan Bergmann <sbergman@redhat.com>
f325b2
Date: Tue, 10 Nov 2015 13:20:42 +0100
f325b2
Subject: [PATCH 294/398] Add a check for non-LIBO_INTERNAL_ONLY,
f325b2
 C++03-compatible LibreOfficeKit.hxx
f325b2
f325b2
Change-Id: I56336b8163de48e424526f5f426c2ad350292627
f325b2
(cherry picked from commit b17ca2d4782cea3f4d8576ed29c8760e79fb3a26)
f325b2
---
f325b2
 .../CppunitTest_libreofficekit_checkapi.mk         | 28 ++++++++++++++++++++++
f325b2
 libreofficekit/Module_libreofficekit.mk            |  4 ++++
f325b2
 libreofficekit/qa/unit/checkapi.cxx                | 22 +++++++++++++++++
f325b2
 3 files changed, 54 insertions(+)
f325b2
 create mode 100644 libreofficekit/CppunitTest_libreofficekit_checkapi.mk
f325b2
 create mode 100644 libreofficekit/qa/unit/checkapi.cxx
f325b2
f325b2
diff --git a/libreofficekit/CppunitTest_libreofficekit_checkapi.mk b/libreofficekit/CppunitTest_libreofficekit_checkapi.mk
f325b2
new file mode 100644
f325b2
index 000000000000..600564a2ac13
f325b2
--- /dev/null
f325b2
+++ b/libreofficekit/CppunitTest_libreofficekit_checkapi.mk
f325b2
@@ -0,0 +1,28 @@
f325b2
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
f325b2
+#
f325b2
+# This file is part of the LibreOffice project.
f325b2
+#
f325b2
+# This Source Code Form is subject to the terms of the Mozilla Public
f325b2
+# License, v. 2.0. If a copy of the MPL was not distributed with this
f325b2
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
f325b2
+#
f325b2
+
f325b2
+$(eval $(call gb_CppunitTest_CppunitTest,libreofficekit_checkapi))
f325b2
+
f325b2
+$(eval $(call gb_CppunitTest_add_cxxflags,libreofficekit_checkapi, \
f325b2
+    $(gb_CXX03FLAGS) \
f325b2
+))
f325b2
+
f325b2
+$(eval $(call gb_CppunitTest_add_exception_objects,libreofficekit_checkapi, \
f325b2
+    libreofficekit/qa/unit/checkapi \
f325b2
+))
f325b2
+
f325b2
+$(eval $(call gb_CppunitTest_set_external_code,libreofficekit_checkapi))
f325b2
+
f325b2
+ifeq ($(OS),LINUX)
f325b2
+$(eval $(call gb_CppunitTest_add_libs,libreofficekit_checkapi, \
f325b2
+    -ldl \
f325b2
+))
f325b2
+endif
f325b2
+
f325b2
+# vim: set noet sw=4 ts=4:
f325b2
diff --git a/libreofficekit/Module_libreofficekit.mk b/libreofficekit/Module_libreofficekit.mk
f325b2
index 7d1c5ead764e..70cf40b6384e 100644
f325b2
--- a/libreofficekit/Module_libreofficekit.mk
f325b2
+++ b/libreofficekit/Module_libreofficekit.mk
f325b2
@@ -11,6 +11,10 @@ $(eval $(call gb_Module_Module,libreofficekit))
f325b2
 
f325b2
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
f325b2
 
f325b2
+$(eval $(call gb_Module_add_check_targets,libreofficekit, \
f325b2
+    CppunitTest_libreofficekit_checkapi \
f325b2
+))
f325b2
+
f325b2
 $(eval $(call gb_Module_add_subsequentcheck_targets,libreofficekit,\
f325b2
     CppunitTest_libreofficekit_tiledrendering \
f325b2
 ))
f325b2
diff --git a/libreofficekit/qa/unit/checkapi.cxx b/libreofficekit/qa/unit/checkapi.cxx
f325b2
new file mode 100644
f325b2
index 000000000000..acf00e0b9cb1
f325b2
--- /dev/null
f325b2
+++ b/libreofficekit/qa/unit/checkapi.cxx
f325b2
@@ -0,0 +1,22 @@
f325b2
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
f325b2
+/*
f325b2
+ * This file is part of the LibreOffice project.
f325b2
+ *
f325b2
+ * This Source Code Form is subject to the terms of the Mozilla Public
f325b2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
f325b2
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
f325b2
+ */
f325b2
+
f325b2
+#if defined LIBO_INTERNAL_ONLY
f325b2
+#error Build system problem; LIBO_INTERNAL_ONLY should not be defined here
f325b2
+#endif
f325b2
+
f325b2
+#include <LibreOfficeKit/LibreOfficeKit.hxx>
f325b2
+
f325b2
+#include <sal/config.h>
f325b2
+#include <sal/saldllapi.h>
f325b2
+#include <cppunit/plugin/TestPlugIn.h>
f325b2
+
f325b2
+CPPUNIT_PLUGIN_IMPLEMENT();
f325b2
+
f325b2
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
f325b2
-- 
f325b2
2.12.0
f325b2