mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-07 21:37:14 +01:00
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
90 lines
2.3 KiB
C
90 lines
2.3 KiB
C
//
|
|
// CppUnit.h
|
|
//
|
|
|
|
|
|
#ifndef CppUnit_CppUnit_INCLUDED
|
|
#define CppUnit_CppUnit_INCLUDED
|
|
|
|
//
|
|
// Ensure that POCO_DLL is default unless POCO_STATIC is defined
|
|
//
|
|
#if defined(_WIN32) && defined(_DLL)
|
|
#if !defined(POCO_DLL) && !defined(POCO_STATIC)
|
|
#define POCO_DLL
|
|
#endif
|
|
#endif
|
|
|
|
|
|
//
|
|
// The following block is the standard way of creating macros which make exporting
|
|
// from a DLL simpler. All files within this DLL are compiled with the CppUnit_EXPORTS
|
|
// symbol defined on the command line. this symbol should not be defined on any project
|
|
// that uses this DLL. This way any other project whose source files include this file see
|
|
// CppUnit_API functions as being imported from a DLL, wheras this DLL sees symbols
|
|
// defined with this macro as being exported.
|
|
//
|
|
#if defined(_WIN32) && defined(POCO_DLL)
|
|
#if defined(CppUnit_EXPORTS)
|
|
#define CppUnit_API __declspec(dllexport)
|
|
#else
|
|
#define CppUnit_API __declspec(dllimport)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#if !defined(CppUnit_API)
|
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
|
#define CppUnit_API __attribute__ ((visibility ("default")))
|
|
#else
|
|
#define CppUnit_API
|
|
#endif
|
|
#endif
|
|
|
|
//
|
|
// Automatically link Data library.
|
|
//
|
|
#if defined(_MSC_VER)
|
|
#if defined(POCO_DLL)
|
|
#if defined(_DEBUG)
|
|
#define POCO_LIB_SUFFIX "d.lib"
|
|
#else
|
|
#define POCO_LIB_SUFFIX ".lib"
|
|
#endif
|
|
#elif defined(_DLL)
|
|
#if defined(_DEBUG)
|
|
#define POCO_LIB_SUFFIX "mdd.lib"
|
|
#else
|
|
#define POCO_LIB_SUFFIX "md.lib"
|
|
#endif
|
|
#else
|
|
#if defined(_DEBUG)
|
|
#define POCO_LIB_SUFFIX "mtd.lib"
|
|
#else
|
|
#define POCO_LIB_SUFFIX "mt.lib"
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#if defined(_MSC_VER) && !defined(POCO_NO_AUTOMATIC_LIBS)
|
|
#if !defined(CppUnit_EXPORTS)
|
|
#pragma comment(lib, "CppUnit" POCO_LIB_SUFFIX)
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// Turn off some annoying warnings
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable:4786) // identifier truncation warning
|
|
#pragma warning(disable:4503) // decorated name length exceeded - mainly a problem with STLPort
|
|
#pragma warning(disable:4018) // signed/unsigned comparison
|
|
#pragma warning(disable:4284) // return type for operator -> is not UDT
|
|
#pragma warning(disable:4251) // ... needs to have dll-interface warning
|
|
#pragma warning(disable:4273)
|
|
#pragma warning(disable:4275) // ... non dll-interface class used as base for dll-interface class
|
|
#endif
|
|
|
|
|
|
#endif // CppUnit_CppUnit_INCLUDED
|