1 #ifndef CPPUNIT_CONFIG_SELECTDLLLOADER_H
2 #define CPPUNIT_CONFIG_SELECTDLLLOADER_H
5 * Selects DynamicLibraryManager implementation.
7 * Don't include this file directly. Include Portability.h instead.
11 * \def CPPUNIT_NO_TESTPLUGIN
12 * \brief If defined, then plug-in related classes and functions will not be compiled.
15 * CPPUNIT_HAVE_WIN32_DLL_LOADER
16 * If defined, Win32 implementation of DynamicLibraryManager will be used.
18 * CPPUNIT_HAVE_BEOS_DLL_LOADER
19 * If defined, BeOs implementation of DynamicLibraryManager will be used.
21 * CPPUNIT_HAVE_UNIX_DLL_LOADER
22 * If defined, Unix implementation (dlfcn.h) of DynamicLibraryManager will be used.
26 * \def CPPUNIT_PLUGIN_EXPORT
27 * \ingroup WritingTestPlugIn
28 * \brief A macro to export a function from a dynamic library
30 * This macro export the C function following it from a dynamic library.
31 * Exporting the function makes it accessible to the DynamicLibraryManager.
35 * #include <cppunit/include/plugin/TestPlugIn.h>
37 * CPPUNIT_PLUGIN_EXPORT CppUnitTestPlugIn *CPPUNIT_PLUGIN_EXPORTED_NAME(void)
40 * return &myPlugInInterface;
45 #if !defined(CPPUNIT_NO_TESTPLUGIN)
47 // Is WIN32 platform ?
49 #define CPPUNIT_HAVE_WIN32_DLL_LOADER 1
50 #undef CPPUNIT_PLUGIN_EXPORT
51 #define CPPUNIT_PLUGIN_EXPORT extern "C" __declspec(dllexport)
54 #elif defined(__BEOS__)
55 #define CPPUNIT_HAVE_BEOS_DLL_LOADER 1
57 // Is Unix platform and have shl_load() (hp-ux)
58 #elif defined(CPPUNIT_HAVE_SHL_LOAD)
59 #define CPPUNIT_HAVE_UNIX_SHL_LOADER 1
61 // Is Unix platform and have include <dlfcn.h>
62 #elif defined(CPPUNIT_HAVE_LIBDL)
63 #define CPPUNIT_HAVE_UNIX_DLL_LOADER 1
65 // Otherwise, disable support for DllLoader
67 #define CPPUNIT_NO_TESTPLUGIN 1
70 #if !defined(CPPUNIT_PLUGIN_EXPORT)
71 #define CPPUNIT_PLUGIN_EXPORT extern "C"
72 #endif // !defined(CPPUNIT_PLUGIN_EXPORT)
74 #endif // !defined(CPPUNIT_NO_TESTPLUGIN)
76 #endif // CPPUNIT_CONFIG_SELECTDLLLOADER_H