Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

compiler.hh

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

acg pic Project OpenMesh, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .