OpenMesh
|
00001 /*===========================================================================*\ 00002 * * 00003 * OpenMesh * 00004 * Copyright (C) 2001-2011 by Computer Graphics Group, RWTH Aachen * 00005 * www.openmesh.org * 00006 * * 00007 *---------------------------------------------------------------------------* 00008 * This file is part of OpenMesh. * 00009 * * 00010 * OpenMesh is free software: you can redistribute it and/or modify * 00011 * it under the terms of the GNU Lesser General Public License as * 00012 * published by the Free Software Foundation, either version 3 of * 00013 * the License, or (at your option) any later version with the * 00014 * following exceptions: * 00015 * * 00016 * If other files instantiate templates or use macros * 00017 * or inline functions from this file, or you compile this file and * 00018 * link it with other files to produce an executable, this file does * 00019 * not by itself cause the resulting executable to be covered by the * 00020 * GNU Lesser General Public License. This exception does not however * 00021 * invalidate any other reasons why the executable file might be * 00022 * covered by the GNU Lesser General Public License. * 00023 * * 00024 * OpenMesh is distributed in the hope that it will be useful, * 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 * GNU Lesser General Public License for more details. * 00028 * * 00029 * You should have received a copy of the GNU LesserGeneral Public * 00030 * License along with OpenMesh. If not, * 00031 * see <http://www.gnu.org/licenses/>. * 00032 * * 00033 \*===========================================================================*/ 00034 00035 /*===========================================================================*\ 00036 * * 00037 * $Revision: 362 $ * 00038 * $Date: 2011-01-26 10:21:12 +0100 (Mi, 26 Jan 2011) $ * 00039 * * 00040 \*===========================================================================*/ 00041 00042 00043 #ifndef OPENMESH_COMPILER_H 00044 #define OPENMESH_COMPILER_H 00045 00046 //============================================================================= 00047 00048 #if defined(ACGMAKE_STATIC_BUILD) 00049 # define OM_STATIC_BUILD 1 00050 #endif 00051 00052 //============================================================================= 00053 00054 #if defined(_DEBUG) || defined(DEBUG) 00055 # define OM_DEBUG 00056 #endif 00057 00058 //============================================================================= 00059 00060 // Workaround for Intel Compiler with MS VC++ 6 00061 #if defined(_MSC_VER) && \ 00062 ( defined(__ICL) || defined(__INTEL_COMPILER) || defined(__ICC) ) 00063 # if !defined(__INTEL_COMPILER) 00064 # define __INTEL_COMPILER __ICL 00065 # endif 00066 # define OM_USE_INTEL_COMPILER 1 00067 #endif 00068 00069 // --------------------------------------------------------- MS Visual C++ ---- 00070 // Compiler _MSC_VER 00071 // .NET 2002 1300 00072 // .NET 2003 1310 00073 // .NET 2005 1400 00074 #if defined(_MSC_VER) && !defined(OM_USE_INTEL_COMPILER) 00075 # if (_MSC_VER == 1300) 00076 # define OM_CC_MSVC 00077 # define OM_TYPENAME 00078 # define OM_OUT_OF_CLASS_TEMPLATE 0 00079 # define OM_PARTIAL_SPECIALIZATION 0 00080 # define OM_INCLUDE_TEMPLATES 1 00081 # elif (_MSC_VER == 1310) 00082 # define OM_CC_MSVC 00083 # define OM_TYPENAME 00084 # define OM_OUT_OF_CLASS_TEMPLATE 1 00085 # define OM_PARTIAL_SPECIALIZATION 1 00086 # define OM_INCLUDE_TEMPLATES 1 00087 # elif (_MSC_VER >= 1400) // settings for .NET 2005 (NOTE: not fully tested) 00088 # pragma warning(disable : 4996) 00089 # define OM_TYPENAME 00090 # define OM_OUT_OF_CLASS_TEMPLATE 1 00091 # define OM_PARTIAL_SPECIALIZATION 1 00092 # define OM_INCLUDE_TEMPLATES 1 00093 # else 00094 # error "Version 7 (.NET 2002) or higher of the MS VC++ is required!" 00095 # endif 00096 // currently no windows dll supported 00097 # define OM_STATIC_BUILD 1 00098 # if defined(_MT) 00099 # define OM_REENTRANT 1 00100 # endif 00101 # define OM_CC "MSVC++" 00102 # define OM_CC_VERSION _MSC_VER 00103 // Does not work stable because the define _CPPRTTI sometimes does not exist, 00104 // though the option /GR is set!? 00105 # if defined(__cplusplus) && !defined(_CPPRTTI) 00106 # error "Enable Runtime Type Information (Compiler Option /GR)!" 00107 # endif 00108 # if !defined(_USE_MATH_DEFINES) 00109 # error "You have to define _USE_MATH_DEFINES in the compiler settings!" 00110 # endif 00111 // ------------------------------------------------------------- Borland C ---- 00112 #elif defined(__BORLANDC__) 00113 # error "Borland Compiler are not supported yet!" 00114 // ------------------------------------------------------------- GNU C/C++ ---- 00115 #elif defined(__GNUC__) && !defined(__ICC) 00116 # define OM_CC_GCC 00117 # define OM_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 ) 00118 # define OM_GCC_MAJOR __GNUC__ 00119 # define OM_GCC_MINOR __GNUC_MINOR__ 00120 # if (OM_GCC_VERSION >= 30200) 00121 # define OM_TYPENAME typename 00122 # define OM_OUT_OF_CLASS_TEMPLATE 1 00123 # define OM_PARTIAL_SPECIALIZATION 1 00124 # define OM_INCLUDE_TEMPLATES 1 00125 # else 00126 # error "Version 3.2.0 or better of the GNU Compiler is required!" 00127 # endif 00128 # if defined(_REENTRANT) 00129 # define OM_REENTRANT 1 00130 # endif 00131 # define OM_CC "GCC" 00132 # define OM_CC_VERSION OM_GCC_VERSION 00133 // ------------------------------------------------------------- Intel icc ---- 00134 #elif defined(__ICC) || defined(__INTEL_COMPILER) 00135 # define OM_CC_ICC 00136 # define OM_TYPENAME typename 00137 # define OM_OUT_OF_CLASS_TEMPLATE 1 00138 # define OM_PARTIAL_SPECIALIZATION 1 00139 # define OM_INCLUDE_TEMPLATES 1 00140 # if defined(_REENTRANT) || defined(_MT) 00141 # define OM_REENTRANT 1 00142 # endif 00143 # define OM_CC "ICC" 00144 # define OM_CC_VERSION __INTEL_COMPILER 00145 // currently no windows dll supported 00146 # if defined(_MSC_VER) || defined(WIN32) 00147 # define OM_STATIC_BUILD 1 00148 # endif 00149 // ------------------------------------------------------ MIPSpro Compiler ---- 00150 #elif defined(__MIPS_ISA) || defined(__mips) 00151 // _MIPS_ISA 00152 // _COMPILER_VERSION e.g. 730, 7 major, 3 minor 00153 // _MIPS_FPSET 32|64 00154 // _MIPS_SZINT 32|64 00155 // _MIPS_SZLONG 32|64 00156 // _MIPS_SZPTR 32|64 00157 # define OM_CC_MIPS 00158 # define OM_TYPENAME typename 00159 # define OM_OUT_OF_CLASS_TEMPLATE 1 00160 # define OM_PARTIAL_SPECIALIZATION 1 00161 # define OM_INCLUDE_TEMPLATES 0 00162 # define OM_CC "MIPS" 00163 # define OM_CC_VERSION _COMPILER_VERSION 00164 // ------------------------------------------------------------------ ???? ---- 00165 #else 00166 # error "You're using an unsupported compiler!" 00167 #endif 00168 00169 //============================================================================= 00170 #endif // OPENMESH_COMPILER_H defined 00171 //============================================================================= 00172