last update 20 Sep 2009 |
00001 /* 00002 * Copyright (C) 1999-2007 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * 00006 * This file is part of the Computer Vision and Robotics Library (CVR-Lib) 00007 * 00008 * The CVR-Lib is free software; you can redistribute it and/or 00009 * modify it under the terms of the BSD License. 00010 * 00011 * All rights reserved. 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions are met: 00015 * 00016 * 1. Redistributions of source code must retain the above copyright notice, 00017 * this list of conditions and the following disclaimer. 00018 * 00019 * 2. Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * 00023 * 3. Neither the name of the authors nor the names of its contributors may be 00024 * used to endorse or promote products derived from this software without 00025 * specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00028 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00031 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00032 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00033 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00034 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00035 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00036 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00037 * POSSIBILITY OF SUCH DAMAGE. 00038 */ 00039 00040 00041 /** 00042 * \file cvrMacroSymbols.h 00043 * Contains several definitions of macros to determine which compiler 00044 * is being used. Since this file is included by cvrObject.h, their 00045 * contents should be defined in every CVR-Libfile. 00046 * \author Pablo Alvarado 00047 * \date 01.04.99 00048 * 00049 * $Id: cvrMacroSymbols.h,v 1.7 2007/09/13 23:28:50 alvarado Exp $ 00050 */ 00051 00052 #ifndef _CVR_MACRO_SYMBOLS_H_ 00053 #define _CVR_MACRO_SYMBOLS_H_ 00054 00055 #if defined(_WIN32) 00056 /** 00057 * \def _CVR_WIN32 00058 * Macro to recognize if the Windows 32-bit library is available 00059 */ 00060 #define _CVR_WIN32 _WIN32 00061 #elif defined(WIN32) 00062 /** 00063 * \def _CVR_WIN32 00064 * Macro to recognize if the Windows 32-bit library is available 00065 */ 00066 #define _CVR_WIN32 WIN32 00067 #endif 00068 00069 #if defined(_MSC_VER) 00070 /** 00071 * \def _CVR_MSC_VER 00072 * Macro to recognize if the MS Visual C++ compiler 6.0 or higher 00073 * (including the .NET family) is being used. 00074 */ 00075 #define _CVR_MSC_VER _MSC_VER 00076 #elif defined(MSC_VER) 00077 /** 00078 * \def _CVR_MSC_VER 00079 * Macro to recognize if the MS Visual C++ compiler 6.0 or higher 00080 * (including the .NET family) is being used. 00081 */ 00082 #define _CVR_MSC_VER MSC_VER 00083 #endif 00084 00085 #if defined(_CVR_MSC_VER) && (_CVR_MSC_VER >= 1310) 00086 /** 00087 * \def _CVR_MSC_DOT_NET 00088 * Macro to recognize if the MS Visual C++ compiler .NET 2003 is being used. 00089 */ 00090 #define _CVR_MSC_DOT_NET _CVR_MSC_VER 00091 #endif 00092 00093 #if defined(_CVR_MSC_VER) && (_CVR_MSC_VER < 1310) 00094 /** 00095 * \def _CVR_MSC_6 00096 * Macro to recognize if a previous version of MS Visual C++ compiler 00097 * .NET 2003 is being used. 00098 * 00099 * Note that this older version of the Visual C++ compiler is \b NOT supported 00100 * by the CVR-Lib, since it lacks many standard C++ issues with templates and 00101 * enclosed classes. 00102 */ 00103 #define _CVR_MSC_6 _CVR_MSC_VER 00104 #endif 00105 00106 00107 #if defined(_CVR_MSC_DOT_NET) && (_CVR_MSC_VER < 1400) 00108 /** 00109 * \def _CVR_MSC_DOT_NET_2003 00110 * Macro to recognize if the MS Visual C++ compiler .NET 2003 is being 00111 * used. 00112 */ 00113 #define _CVR_MSC_DOT_NET_2003 _CVR_MSC_VER 00114 #endif 00115 00116 #if defined(_CVR_MSC_DOT_NET) && (_CVR_MSC_VER >= 1400) 00117 /** 00118 * \def _CVR_MSC_DOT_NET_2005 00119 * Macro to recognize if the MS Visual C++ compiler .NET 2005 is being 00120 * used. 00121 */ 00122 #define _CVR_MSC_DOT_NET_2005 _CVR_MSC_VER 00123 #endif 00124 00125 00126 #if defined(__GNUC__) 00127 /** 00128 * \def _CVR_GNUC 00129 * Macro to recognize if a GNU C++ compiler is being used 00130 */ 00131 #define _CVR_GNUC __GNUC__ 00132 #endif 00133 00134 #if defined(_CVR_GNUC) && (_CVR_GNUC <= 2) 00135 /** 00136 * \def _CVR_GNUC_2 00137 * Macro to recognize if a GNU C++ compiler 2.95 is being used 00138 * 00139 * Note that this older version of the GCC C++ compiler is not supported 00140 * anymore, since it lacks some standard issues in the STL and with the 00141 * keyword "using". 00142 */ 00143 #define _CVR_GNUC_2 _CVR_GNUC 00144 #endif 00145 00146 #if defined(_CVR_GNUC) && (_CVR_GNUC >= 3) 00147 /** 00148 * \def _CVR_GNUC_3 00149 * Macro to recognize if a GNU C++ compiler 3.0 or greater is being used 00150 */ 00151 #define _CVR_GNUC_3 _CVR_GNUC 00152 #endif 00153 00154 #if defined(_CVR_GNUC) && (_CVR_GNUC >= 3) && (__GNUC_MINOR__ >= 4) 00155 /** 00156 * \def _CVR_GNUC_3_4 00157 * Macro to recognize if a GNU C++ compiler 3.4.0 or greater is being used 00158 */ 00159 #define _CVR_GNUC_3_4 _CVR_GNUC 00160 #endif 00161 00162 #if defined(_CVR_GNUC) && (_CVR_GNUC >= 4) 00163 /** 00164 * \def _CVR_GNUC_4 00165 * Macro to recognize if a GNU C++ compiler 4.0.0 or greater is being used 00166 */ 00167 #define _CVR_GNUC_4 _CVR_GNUC 00168 #endif 00169 00170 #if defined(_CVR_GNUC) && (_CVR_GNUC >= 4) && (__GNUC_MINOR__ >= 2) 00171 /** 00172 * \def _CVR_GNUC_4_2 00173 * Macro to recognize if a GNU C++ compiler 4.2.x or greater is being used 00174 */ 00175 #define _CVR_GNUC_4_2 _CVR_GNUC 00176 #endif 00177 00178 #if defined(_CVR_GNUC) && (_CVR_GNUC >= 4) && (__GNUC_MINOR__ >= 3) 00179 /** 00180 * \def _CVR_GNUC_4_3 00181 * Macro to recognize if a GNU C++ compiler 4.3.x or greater is being used 00182 */ 00183 #define _CVR_GNUC_4_3 _CVR_GNUC 00184 #endif 00185 00186 #if defined(__INTEL_COMPILER) 00187 /** 00188 * \def _CVR_ICC 00189 * 00190 * Macro to recognize if an Intel compiler is being used. Note that 00191 * _CVR_GNUC and some _CVR_GNUC_x are also defined in this case 00192 * (unless switched off manually). This is quite useful is most cases 00193 * since gcc and icc behave mostly equivalently. 00194 */ 00195 #define _CVR_ICC __INTEL_COMPILER 00196 #endif 00197 00198 #if defined(__linux__) 00199 /** 00200 * \def _CVR_LINUX 00201 * Macro to recognize if a Linux system is being used 00202 */ 00203 #define _CVR_LINUX 00204 #endif 00205 00206 #if defined(__CYGWIN__) || defined(__CYGWIN32) || defined(__MINGW32__) 00207 /** 00208 * \def _CVR_CYGWIN 00209 * Macro to recognize if a CygWin system is being used 00210 */ 00211 #define _CVR_CYGWIN 00212 #endif 00213 00214 #if defined(__APPLE__) 00215 /** 00216 * \def _CVR_MACOSX 00217 * Macro to recognize if an Apple system is used 00218 */ 00219 #define _CVR_MACOSX 00220 #endif 00221 00222 #endif