aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-21 13:27:50 +0200
committerMontel Laurent <[email protected]>2017-04-21 13:27:50 +0200
commitddabe31a7c297b4d52c6673f0bffda9df79d9017 (patch)
treeb3ec49275119310872b93ba85284502ae522733e
parent23d0e54222995f239258377388060755173d759e (diff)
Add export test symbol
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/akonadicontact_private_export.h35
2 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60f3702..4d74296 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,6 +68,12 @@ endif()
add_definitions(-DTRANSLATION_DOMAIN=\"akonadicontact5\")
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions( -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT )
+
+if(BUILD_TESTING)
+ add_definitions(-DBUILD_TESTING)
+endif(BUILD_TESTING)
+
+
add_subdirectory(src)
if (BUILD_TESTING)
add_subdirectory(autotests)
diff --git a/src/akonadicontact_private_export.h b/src/akonadicontact_private_export.h
new file mode 100644
index 0000000..9ee5be3
--- /dev/null
+++ b/src/akonadicontact_private_export.h
@@ -0,0 +1,35 @@
+/* This file is part of the KDE project
+ Copyright (C) 2017 Laurent Montel <[email protected]>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#ifndef AKONADI_CONTACTSPRIVATE_EXPORT_H
+#define AKONADI_CONTACTSPRIVATE_EXPORT_H
+
+#include "akonadi-contact_export.h"
+
+/* Classes which are exported only for unit tests */
+#ifdef BUILD_TESTING
+# ifndef AKONADI_CONTACTS_TESTS_EXPORT
+# define AKONADI_CONTACTS_TESTS_EXPORT AKONADI_CONTACT_EXPORT
+# endif
+#else /* not compiling tests */
+# define AKONADI_CONTACTS_TESTS_EXPORT
+#endif
+
+#endif
+