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

compiler.hh

00001 //=============================================================================
00002 //                                                                            
00003 //                               OpenMesh                                     
00004 //        Copyright (C) 2003 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.3 $
00027 //   $Date: 2004/01/20 14:48:26 $
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(_MT)
00080 #    define OM_REENTRANT 1
00081 #  endif
00082 #  define OM_CC "MSVC++"
00083 #  define OM_CC_VERSION _MSC_VER
00084 // Does not work stable because the define _CPPRTTI sometimes does not exist,
00085 // though the option /GR is set!? 
00086 #  if defined(__cplusplus) && !defined(_CPPRTTI)
00087 #    error "Enable Runtime Type Information (Compiler Option /GR)!"
00088 #  endif
00089 #  if !defined(_USE_MATH_DEFINES)
00090 #    error "You have to define _USE_MATH_DEFINES in the compiler settings!"
00091 #  endif
00092 // ------------------------------------------------------------- Borland C ----
00093 #elif defined(__BORLANDC__)
00094 #  error "Borland Compiler are not supported yet!"
00095 // ------------------------------------------------------------- GNU C/C++ ----
00096 #elif defined(__GNUC__) && !defined(__ICC)
00097 #  define OM_CC_GCC
00098 #  define OM_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 )
00099 #  define OM_GCC_MAJOR                __GNUC__
00100 #  define OM_GCC_MINOR                __GNUC_MINOR__
00101 #  if (OM_GCC_VERSION >= 30200)
00102 #    define OM_TYPENAME typename
00103 #    define OM_OUT_OF_CLASS_TEMPLATE  1
00104 #    define OM_PARTIAL_SPECIALIZATION 1
00105 #    define OM_INCLUDE_TEMPLATES      1
00106 #  else
00107 #    error "Version 3.2.0 or better of the GNU Compiler is required!"
00108 #  endif
00109 #  if defined(_REENTRANT)
00110 #    define OM_REENTRANT 1
00111 #  endif
00112 #  define OM_CC "GCC"
00113 #  define OM_CC_VERSION OM_GCC_VERSION
00114 // ------------------------------------------------------------- Intel icc ----
00115 #elif defined(__ICC) || defined(__INTEL_COMPILER)
00116 #  define OM_CC_ICC
00117 #  define OM_TYPENAME typename
00118 #  define OM_OUT_OF_CLASS_TEMPLATE  1
00119 #  define OM_PARTIAL_SPECIALIZATION 1
00120 #  define OM_INCLUDE_TEMPLATES      1
00121 #  if defined(_REENTRANT) || defined(_MT)
00122 #    define OM_REENTRANT 1
00123 #  endif
00124 #  define OM_CC "ICC"
00125 #  define OM_CC_VERSION __INTEL_COMPILER
00126 //   currently no windows dll supported
00127 #  if defined(_MSC_VER) || defined(WIN32)
00128 #    define OM_STATIC_BUILD 1
00129 #  endif
00130 // ------------------------------------------------------ MIPSpro Compiler ----
00131 #elif defined(__MIPS_ISA) || defined(__mips)
00132 // _MIPS_ISA                    
00133 // _COMPILER_VERSION            e.g. 730, 7 major, 3 minor
00134 // _MIPS_FPSET                  32|64
00135 // _MIPS_SZINT                  32|64
00136 // _MIPS_SZLONG                 32|64
00137 // _MIPS_SZPTR                  32|64
00138 #  define OM_CC_MIPS
00139 #  define OM_TYPENAME typename
00140 #  define OM_OUT_OF_CLASS_TEMPLATE    1
00141 #  define OM_PARTIAL_SPECIALIZATION   1
00142 #  define OM_INCLUDE_TEMPLATES        0
00143 #  define OM_CC "MIPS"
00144 #  define OM_CC_VERSION _COMPILER_VERSION
00145 // ------------------------------------------------------------------ ???? ----
00146 #else
00147 #  error "You're using an unsupported compiler!"
00148 #endif
00149 
00150 //=============================================================================
00151 #endif // OPENMESH_COMPILER_H defined
00152 //=============================================================================
00153 

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