Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

xcontract/compiler_warnings_suppression.first_include.h

00001 /* /////////////////////////////////////////////////////////////////////////
00002  * File:        xcontract/implicit_link.h
00003  *
00004  * Purpose:     Implicit linking for the xContract API
00005  *
00006  * Created:     3rd March 2003
00007  * Updated:     1st April 2008
00008  *
00009  * Home:        http://xcontract.org/
00010  *
00011  * Copyright (c) 2003-2008, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without
00015  * modification, are permitted provided that the following conditions are
00016  * met:
00017  *
00018  * - Redistributions of source code must retain the above copyright notice,
00019  *   this list of conditions and the following disclaimer.
00020  * - Redistributions in binary form must reproduce the above copyright
00021  *   notice, this list of conditions and the following disclaimer in the
00022  *   documentation and/or other materials provided with the distribution.
00023  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
00024  *   names of any contributors may be used to endorse or promote products
00025  *   derived from this software without specific prior written permission.
00026  *
00027  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
00028  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00029  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00030  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00031  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00032  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00033  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00034  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00035  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00036  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00037  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038  *
00039  * ////////////////////////////////////////////////////////////////////// */
00040 
00041 
00054 #ifndef XCONTRACT_INCL_XCONTRACT_H_IMPLICIT_LINK
00055 #define XCONTRACT_INCL_XCONTRACT_H_IMPLICIT_LINK
00056 
00057 /* /////////////////////////////////////////////////////////////////////////
00058  * Version information
00059  */
00060 
00061 #ifndef XCONTRACT_DOCUMENTATION_SKIP_SECTION
00062 # define XCONTRACT_VER_XCONTRACT_H_IMPLICIT_LINK_MAJOR      1
00063 # define XCONTRACT_VER_XCONTRACT_H_IMPLICIT_LINK_MINOR      2
00064 # define XCONTRACT_VER_XCONTRACT_H_IMPLICIT_LINK_REVISION   1
00065 # define XCONTRACT_VER_XCONTRACT_H_IMPLICIT_LINK_EDIT       22
00066 #endif /* !XCONTRACT_DOCUMENTATION_SKIP_SECTION */
00067 
00068 /* /////////////////////////////////////////////////////////////////////////
00069  * Includes
00070  */
00071 
00072 #ifndef XCONTRACT_INCL_XCONTRACT_H_XCONTRACT
00073 # include <xcontract/xcontract.h>
00074 #endif /* !XCONTRACT_INCL_XCONTRACT_H_XCONTRACT */
00075 
00076 /* /////////////////////////////////////////////////////////////////////////
00077  * Implicit linking
00078  */
00079 
00080 #if defined(WIN32) || \
00081     defined(_WIN32)
00082 
00083 # if defined(__BORLANDC__) || \
00084      /* defined(__DMC__) || */ \
00085      defined(__INTEL_COMPILER) || \
00086      defined(__MWERKS__) || \
00087      defined(_MSC_VER)
00088 #  define XCONTRACT_IMPLICIT_LINK_SUPPORT
00089 # endif /* compiler */
00090 
00091 # if defined(XCONTRACT_IMPLICIT_LINK_SUPPORT) && \
00092      defined(XCONTRACT_NO_IMPLICIT_LINK)
00093 #  undef XCONTRACT_IMPLICIT_LINK_SUPPORT
00094 # endif /* XCONTRACT_IMPLICIT_LINK_SUPPORT && XCONTRACT_NO_IMPLICIT_LINK */
00095 
00096 # if defined(XCONTRACT_IMPLICIT_LINK_SUPPORT)
00097 
00098 #  if defined(__BORLANDC__)
00099 #   if __BORLANDC__ == 0x0550
00100 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "bc55"
00101 #   elif (__BORLANDC__ == 0x0551)
00102 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "bc551"
00103 #   elif (__BORLANDC__ == 0x0560)
00104 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "bc56"
00105 #   elif (__BORLANDC__ == 0x0564)
00106 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "bc564"
00107 #   elif (__BORLANDC__ == 0x0582)
00108 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "bc582"
00109 #   else /* ? __BORLANDC__ */
00110 #    error Unrecognised value of __BORLANDC__
00111 #   endif /* __BORLANDC__ */
00112 
00113 /*
00114 #  elif defined(__DMC__)
00115 #   define XCONTRACT_IMPL_LINK_COMPILER_NAME                "dm"
00116  */
00117 
00118 #  elif defined(__INTEL_COMPILER)
00119 #   if __INTEL_COMPILER == 600
00120 #    define   XCONTRACT_IMPL_LINK_COMPILER_NAME             "icl6"
00121 #   elif __INTEL_COMPILER == 700
00122 #    define   XCONTRACT_IMPL_LINK_COMPILER_NAME             "icl7"
00123 #   elif __INTEL_COMPILER == 800
00124 #    define   XCONTRACT_IMPL_LINK_COMPILER_NAME             "icl8"
00125 #   elif __INTEL_COMPILER == 900
00126 #    define   XCONTRACT_IMPL_LINK_COMPILER_NAME             "icl9"
00127 #   else
00128 #    error Intel C/C++ version not supported
00129 #   endif /* _MSC_VER */
00130 
00131 #  elif defined(__MWERKS__)
00132 #   if ((__MWERKS__ & 0xFF00) == 0x2400)
00133 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "cw7"
00134 #   elif ((__MWERKS__ & 0xFF00) == 0x3000)
00135 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "cw8"
00136 #   elif ((__MWERKS__ & 0xFF00) == 0x3200)
00137 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "cw9"
00138 #   else /* ? __MWERKS__ */
00139 #    error Unrecognised value of __MWERKS__
00140 #   endif /* __MWERKS__ */
00141 
00142 #  elif defined(_MSC_VER)
00143 #   if _MSC_VER == 1000
00144 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc4"
00145 #   elif _MSC_VER == 1020
00146 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc42"
00147 #   elif _MSC_VER == 1100
00148 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc5"
00149 #   elif _MSC_VER == 1200
00150 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc6"
00151 #   elif _MSC_VER == 1300
00152 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc7"
00153 #   elif _MSC_VER == 1310
00154 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc71"
00155 #   elif _MSC_VER == 1400
00156 #    define XCONTRACT_IMPL_LINK_COMPILER_NAME               "vc8"
00157 #   else /* ? _MSC_VER */
00158 #    error Visual C++ version not supported
00159 #   endif /* _MSC_VER */
00160 
00161 #  else /* ? compiler */
00162 #   error Unrecognised compiler
00163 #  endif /* compiler */
00164 
00165 
00166 #  if defined(__MT__) || \
00167       defined(_REENTRANT) || \
00168       defined(_MT)
00169 #   if defined(_DLL) || \
00170        defined(__DLL)
00171 #    define XCONTRACT_IMPL_LINK_THREADING_TYPE              ".dll"
00172 #   else /* ? dll */
00173 #    define XCONTRACT_IMPL_LINK_THREADING_TYPE              ".mt"
00174 #   endif /* dll */
00175 #  else /* ? mt */
00176 #    define XCONTRACT_IMPL_LINK_THREADING_TYPE              ""
00177 #  endif /* mt */
00178 
00179 
00180 #  if !defined(NDEBUG) && \
00181       defined(_DEBUG)
00182 #   define XCONTRACT_IMPL_LINK_DEBUG_TYPE                   ".debug"
00183 #  else /* ? _DEBUG */
00184 #   define XCONTRACT_IMPL_LINK_DEBUG_TYPE                   ""
00185 #  endif /* _DEBUG */
00186 
00187 # define XCONTRACT_IMPL_LINK_LIB_PREFIX
00188 
00189 # define XCONTRACT_IMPL_LINK_LIB_EXTENSION                  ".lib"
00190 
00191 
00192 #  define XCONTRACT_IMPL_LINK_LIBRARY_BASENAME_s_(x)        #x
00193 #  define XCONTRACT_IMPL_LINK_LIBRARY_BASENAME_s(x)         XCONTRACT_IMPL_LINK_LIBRARY_BASENAME_s_(x)
00194 #  define XCONTRACT_IMPL_LINK_LIBRARY_BASENAME              "xcontract." XCONTRACT_IMPL_LINK_LIBRARY_BASENAME_s(_XCONTRACT_VER_MAJOR) ".core."
00195 
00196 #  define XCONTRACT_IMPL_LINK_LIBRARY_NAME                  XCONTRACT_IMPL_LINK_LIB_PREFIX XCONTRACT_IMPL_LINK_LIBRARY_BASENAME XCONTRACT_IMPL_LINK_COMPILER_NAME XCONTRACT_IMPL_LINK_THREADING_TYPE XCONTRACT_IMPL_LINK_DEBUG_TYPE XCONTRACT_IMPL_LINK_LIB_EXTENSION
00197 
00198 #  pragma message("lib: " XCONTRACT_IMPL_LINK_LIBRARY_NAME)
00199 
00200 #  pragma comment(lib, XCONTRACT_IMPL_LINK_LIBRARY_NAME)
00201 
00202 # endif /* XCONTRACT_IMPLICIT_LINK_SUPPORT */
00203 
00204 #endif /* Win32 */
00205 
00206 /* ////////////////////////////////////////////////////////////////////// */
00207 
00208 #endif /* !XCONTRACT_INCL_XCONTRACT_H_IMPLICIT_LINK */
00209 
00210 /* ////////////////////////////////////////////////////////////////////// */

b64 Library documentation © Synesis Software Pty Ltd, 2004-2007