setup.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 #ifndef glm_setup
00030 #define glm_setup
00031 
00033 // Version
00034 
00035 #define GLM_VERSION                                     93
00036 #define GLM_VERSION_MAJOR                       0
00037 #define GLM_VERSION_MINOR                       9
00038 #define GLM_VERSION_PATCH                       3
00039 #define GLM_VERSION_REVISION            0
00040 
00042 // Compiler
00043 
00044 // User defines: GLM_FORCE_COMPILER_UNKNOWN
00045 // TODO ? __llvm__ 
00046 
00047 #define GLM_COMPILER_UNKNOWN            0x00000000
00048 
00049 // Visual C++ defines
00050 #define GLM_COMPILER_VC                         0x01000000
00051 #define GLM_COMPILER_VC2                        0x01000010
00052 #define GLM_COMPILER_VC4                        0x01000020
00053 #define GLM_COMPILER_VC5                        0x01000030
00054 #define GLM_COMPILER_VC6                        0x01000040
00055 #define GLM_COMPILER_VC2002                     0x01000050
00056 #define GLM_COMPILER_VC2003                     0x01000060
00057 #define GLM_COMPILER_VC2005                     0x01000070
00058 #define GLM_COMPILER_VC2008                     0x01000080
00059 #define GLM_COMPILER_VC2010                     0x01000090
00060 #define GLM_COMPILER_VC2011                     0x010000A0
00061 
00062 // GCC defines
00063 #define GLM_COMPILER_GCC            0x02000000
00064 #define GLM_COMPILER_GCC_LLVM       0x02000001
00065 #define GLM_COMPILER_GCC_CLANG      0x02000002
00066 #define GLM_COMPILER_GCC30                      0x02000010
00067 #define GLM_COMPILER_GCC31                      0x02000020
00068 #define GLM_COMPILER_GCC32                      0x02000030
00069 #define GLM_COMPILER_GCC33                      0x02000040
00070 #define GLM_COMPILER_GCC34                      0x02000050
00071 #define GLM_COMPILER_GCC35                      0x02000060
00072 #define GLM_COMPILER_GCC40                      0x02000070
00073 #define GLM_COMPILER_GCC41                      0x02000080
00074 #define GLM_COMPILER_GCC42                      0x02000090
00075 #define GLM_COMPILER_GCC43                      0x020000A0
00076 #define GLM_COMPILER_GCC44                      0x020000B0
00077 #define GLM_COMPILER_GCC45                      0x020000C0
00078 #define GLM_COMPILER_GCC46                      0x020000D0
00079 #define GLM_COMPILER_GCC47                      0x020000E0
00080 #define GLM_COMPILER_GCC48                      0x020000F0
00081 #define GLM_COMPILER_GCC49                      0x02000100
00082 #define GLM_COMPILER_GCC50                      0x02000200
00083 
00084 // G++ command line to display defined
00085 // echo "" | g++ -E -dM -x c++ - | sort
00086 
00087 // Borland C++ defines. How to identify BC?
00088 #define GLM_COMPILER_BC                         0x04000000
00089 #define GLM_COMPILER_BCB4                       0x04000100
00090 #define GLM_COMPILER_BCB5                       0x04000200
00091 #define GLM_COMPILER_BCB6                       0x04000300
00092 //#define GLM_COMPILER_BCBX                     0x04000400 // What's the version value?
00093 #define GLM_COMPILER_BCB2009            0x04000500
00094 
00095 // CodeWarrior
00096 #define GLM_COMPILER_CODEWARRIOR        0x08000000
00097 
00098 // CUDA
00099 #define GLM_COMPILER_CUDA           0x10000000
00100 #define GLM_COMPILER_CUDA30                     0x10000010
00101 #define GLM_COMPILER_CUDA31                     0x10000020
00102 #define GLM_COMPILER_CUDA32                     0x10000030
00103 #define GLM_COMPILER_CUDA40                     0x10000040
00104 
00105 // Clang
00106 #define GLM_COMPILER_CLANG          0x20000000
00107 #define GLM_COMPILER_CLANG26            0x20000010
00108 #define GLM_COMPILER_CLANG27            0x20000020
00109 #define GLM_COMPILER_CLANG28            0x20000030
00110 #define GLM_COMPILER_CLANG29            0x20000040
00111 
00112 // LLVM GCC
00113 #define GLM_COMPILER_LLVM_GCC           0x40000000
00114 
00115 // Build model
00116 #define GLM_MODEL_32                            0x00000010
00117 #define GLM_MODEL_64                            0x00000020
00118 
00119 // Force generic C++ compiler
00120 #ifdef GLM_FORCE_COMPILER_UNKNOWN
00121 #               define GLM_COMPILER GLM_COMPILER_UNKNOWN
00122 
00123 // CUDA
00124 #elif defined(__CUDACC__)
00125 #       define GLM_COMPILER GLM_COMPILER_CUDA
00126 /*
00127 #       if CUDA_VERSION < 3000
00128 #               error "GLM requires CUDA 3.0 or higher"
00129 #       elif CUDA_VERSION == 3000
00130 #               define GLM_COMPILER GLM_COMPILER_CUDA30 
00131 #       elif CUDA_VERSION == 3010
00132 #               define GLM_COMPILER GLM_COMPILER_CUDA31 
00133 #       elif CUDA_VERSION == 3020
00134 #               define GLM_COMPILER GLM_COMPILER_CUDA32 
00135 #       elif CUDA_VERSION == 4000
00136 #               define GLM_COMPILER GLM_COMPILER_CUDA40 
00137 #       else
00138 #               define GLM_COMPILER GLM_COMPILER_CUDA
00139 #       endif
00140 */
00141 
00142 // Visual C++
00143 #elif defined(_MSC_VER)
00144 #       if _MSC_VER == 900
00145 #               define GLM_COMPILER GLM_COMPILER_VC2
00146 #       elif _MSC_VER == 1000
00147 #               define GLM_COMPILER GLM_COMPILER_VC4
00148 #       elif _MSC_VER == 1100
00149 #               define GLM_COMPILER GLM_COMPILER_VC5
00150 #       elif _MSC_VER == 1200
00151 #               define GLM_COMPILER GLM_COMPILER_VC6
00152 #       elif _MSC_VER == 1300
00153 #               define GLM_COMPILER GLM_COMPILER_VC2002
00154 #       elif _MSC_VER == 1310
00155 #               define GLM_COMPILER GLM_COMPILER_VC2003
00156 #       elif _MSC_VER == 1400
00157 #               define GLM_COMPILER GLM_COMPILER_VC2005
00158 #       elif _MSC_VER == 1500
00159 #               define GLM_COMPILER GLM_COMPILER_VC2008
00160 #       elif _MSC_VER == 1600
00161 #               define GLM_COMPILER GLM_COMPILER_VC2010
00162 #       elif _MSC_VER == 1700
00163 #               define GLM_COMPILER GLM_COMPILER_VC2011
00164 #       else//_MSC_VER
00165 #               define GLM_COMPILER GLM_COMPILER_VC
00166 #       endif//_MSC_VER
00167 
00168 // G++
00169 #elif defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
00170 #   if defined (__llvm__)
00171 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
00172 #   elif defined (__clang__)
00173 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG
00174 #   else
00175 #       define GLM_COMPILER_GCC_EXTRA 0
00176 #   endif
00177 #
00178 #       if   (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
00179 #               define GLM_COMPILER GLM_COMPILER_GCC32
00180 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
00181 #               define GLM_COMPILER GLM_COMPILER_GCC33
00182 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
00183 #               define GLM_COMPILER GLM_COMPILER_GCC34
00184 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
00185 #               define GLM_COMPILER GLM_COMPILER_GCC35
00186 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)
00187 #               define GLM_COMPILER (GLM_COMPILER_GCC40 | GLM_COMPILER_GCC_EXTRA)
00188 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)
00189 #               define GLM_COMPILER (GLM_COMPILER_GCC41 | GLM_COMPILER_GCC_EXTRA)
00190 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
00191 #               define GLM_COMPILER (GLM_COMPILER_GCC42 | GLM_COMPILER_GCC_EXTRA)
00192 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
00193 #               define GLM_COMPILER (GLM_COMPILER_GCC43 | GLM_COMPILER_GCC_EXTRA)
00194 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
00195 #               define GLM_COMPILER (GLM_COMPILER_GCC44 | GLM_COMPILER_GCC_EXTRA)
00196 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
00197 #               define GLM_COMPILER (GLM_COMPILER_GCC45 | GLM_COMPILER_GCC_EXTRA)
00198 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
00199 #               define GLM_COMPILER (GLM_COMPILER_GCC46 | GLM_COMPILER_GCC_EXTRA)
00200 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
00201 #               define GLM_COMPILER (GLM_COMPILER_GCC47 | GLM_COMPILER_GCC_EXTRA)
00202 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
00203 #               define GLM_COMPILER (GLM_COMPILER_GCC48 | GLM_COMPILER_GCC_EXTRA)
00204 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 9)
00205 #               define GLM_COMPILER (GLM_COMPILER_GCC49 | GLM_COMPILER_GCC_EXTRA)
00206 #       elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
00207 #               define GLM_COMPILER (GLM_COMPILER_GCC50 | GLM_COMPILER_GCC_EXTRA)
00208 #       else
00209 #               define GLM_COMPILER (GLM_COMPILER_GCC | GLM_COMPILER_GCC_EXTRA)
00210 #       endif
00211 
00212 // Borland C++
00213 #elif defined(_BORLANDC_)
00214 #       if defined(VER125)
00215 #               define GLM_COMPILER GLM_COMPILER_BCB4
00216 #       elif defined(VER130)
00217 #               define GLM_COMPILER GLM_COMPILER_BCB5
00218 #       elif defined(VER140)
00219 #               define GLM_COMPILER GLM_COMPILER_BCB6
00220 #       elif defined(VER200)
00221 #               define GLM_COMPILER GLM_COMPILER_BCB2009
00222 #       else
00223 #               define GLM_COMPILER GLM_COMPILER_BC
00224 #       endif
00225 
00226 // Codewarrior
00227 #elif defined(__MWERKS__)
00228 #       define GLM_COMPILER GLM_COMPILER_CODEWARRIOR
00229 
00230 #else
00231 #       define GLM_COMPILER GLM_COMPILER_UNKNOWN
00232 #endif
00233 
00234 #ifndef GLM_COMPILER
00235 #error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
00236 #endif//GLM_COMPILER
00237 
00238 // Report compiler detection
00239 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))
00240 #       define GLM_MESSAGE_COMPILER_DISPLAYED
00241 #       if(GLM_COMPILER & GLM_COMPILER_CUDA)
00242 #               pragma message("GLM: CUDA compiler detected")
00243 #       elif(GLM_COMPILER & GLM_COMPILER_VC)
00244 #               pragma message("GLM: Visual C++ compiler detected")
00245 #       elif(GLM_COMPILER & GLM_COMPILER_CLANG)
00246 #               pragma message("GLM: Clang compiler detected")
00247 #       elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
00248 #               pragma message("GLM: LLVM GCC compiler detected")
00249 #       elif(GLM_COMPILER & GLM_COMPILER_GCC)
00250 #       if(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)
00251 #           pragma message("GLM: LLVM GCC compiler detected")
00252 #       elif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)
00253 #           pragma message("GLM: CLANG compiler detected")
00254 #       else
00255 #           pragma message("GLM: GCC compiler detected")
00256 #       endif
00257 #       elif(GLM_COMPILER & GLM_COMPILER_BC)
00258 #               pragma message("GLM: Borland compiler detected but not supported")
00259 #       elif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)
00260 #               pragma message("GLM: Codewarrior compiler detected but not supported")
00261 #       else
00262 #               pragma message("GLM: Compiler not detected")
00263 #       endif
00264 #endif//GLM_MESSAGE
00265 
00267 // Build model //
00268 
00269 #if(GLM_COMPILER & GLM_COMPILER_VC)
00270 #       if defined(_M_X64)
00271 #               define GLM_MODEL        GLM_MODEL_64
00272 #       else
00273 #               define GLM_MODEL        GLM_MODEL_32
00274 #       endif//_M_X64
00275 #elif(GLM_COMPILER & GLM_COMPILER_GCC)
00276 #       if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__) || defined(__x86_64__)
00277 #               define GLM_MODEL        GLM_MODEL_64
00278 #       else
00279 #               define GLM_MODEL        GLM_MODEL_32
00280 #       endif//
00281 #else
00282 #       define GLM_MODEL        GLM_MODEL_32
00283 #endif//
00284 
00285 #if(!defined(GLM_MODEL) && GLM_COMPILER != 0)
00286 #error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
00287 #endif//GLM_MODEL
00288 
00289 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))
00290 #       define GLM_MESSAGE_MODEL_DISPLAYED
00291 #       if(GLM_MODEL == GLM_MODEL_64)
00292 #               pragma message("GLM: 64 bits model")
00293 #       elif(GLM_MODEL == GLM_MODEL_32)
00294 #               pragma message("GLM: 32 bits model")
00295 #       endif//GLM_MODEL
00296 #endif//GLM_MESSAGE
00297 
00299 // C++ Version //
00300 
00301 // User defines: GLM_FORCE_CXX98
00302 
00303 #define GLM_LANG_CXX                    0
00304 #define GLM_LANG_CXX98                  1
00305 #define GLM_LANG_CXX0X                  2
00306 #define GLM_LANG_CXXMS                  3
00307 #define GLM_LANG_CXXGNU                 4
00308 
00309 #if(defined(GLM_FORCE_CXX98))
00310 #       define GLM_LANG GLM_LANG_CXX98
00311 #elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
00312 #       define GLM_LANG GLM_LANG_CXX0X
00313 #elif(GLM_COMPILER == GLM_COMPILER_VC2010) //_MSC_EXTENSIONS for MS language extensions
00314 #       define GLM_LANG GLM_LANG_CXX0X
00315 #elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__STRICT_ANSI__))
00316 #       define GLM_LANG GLM_LANG_CXX98
00317 #elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS))
00318 #       define GLM_LANG GLM_LANG_CXX98
00319 #else
00320 #       define GLM_LANG GLM_LANG_CXX
00321 #endif
00322 
00323 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))
00324 #       define GLM_MESSAGE_LANG_DISPLAYED
00325 #       if(GLM_LANG == GLM_LANG_CXX98)
00326 #               pragma message("GLM: C++98")
00327 #       elif(GLM_LANG == GLM_LANG_CXX0X)
00328 #               pragma message("GLM: C++0x")
00329 #       endif//GLM_MODEL
00330 #endif//GLM_MESSAGE
00331 
00333 // Platform 
00334 
00335 // User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX
00336 
00337 #define GLM_ARCH_PURE           0x0000 //(0x0000)
00338 #define GLM_ARCH_SSE2           0x0001 //(0x0001)
00339 #define GLM_ARCH_SSE3           0x0003 //(0x0002 | GLM_ARCH_SSE2)
00340 #define GLM_ARCH_AVX            0x0007 //(0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
00341 
00342 #if(defined(GLM_FORCE_PURE))
00343 #       define GLM_ARCH GLM_ARCH_PURE
00344 #elif(defined(GLM_FORCE_AVX))
00345 #       define GLM_ARCH GLM_ARCH_AVX
00346 #elif(defined(GLM_FORCE_SSE3))
00347 #       define GLM_ARCH GLM_ARCH_SSE3
00348 #elif(defined(GLM_FORCE_SSE2))
00349 #       define GLM_ARCH GLM_ARCH_SSE2
00350 #elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))
00351 #       if(defined(_M_CEE_PURE))
00352 #               define GLM_ARCH GLM_ARCH_PURE
00353 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
00354 #               if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
00355 #                       define GLM_ARCH GLM_ARCH_AVX //GLM_ARCH_AVX (Require SP1)
00356 #               else
00357 #                       define GLM_ARCH GLM_ARCH_SSE3
00358 #               endif
00359 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2008) 
00360 #               define GLM_ARCH GLM_ARCH_SSE3
00361 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
00362 #               define GLM_ARCH GLM_ARCH_SSE2
00363 #       else
00364 #               define GLM_ARCH GLM_ARCH_PURE
00365 #       endif
00366 #elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
00367 #       if(defined(__AVX__))
00368 #               define GLM_ARCH GLM_ARCH_AVX
00369 #       elif(defined(__SSE3__))
00370 #               define GLM_ARCH GLM_ARCH_SSE3
00371 #       elif(defined(__SSE2__))
00372 #               define GLM_ARCH GLM_ARCH_SSE2
00373 #       else
00374 #               define GLM_ARCH GLM_ARCH_PURE
00375 #       endif
00376 #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
00377 #       if(defined(__AVX__))
00378 #               define GLM_ARCH GLM_ARCH_AVX
00379 #       elif(defined(__SSE3__))
00380 #               define GLM_ARCH GLM_ARCH_SSE3
00381 #       elif(defined(__SSE2__))
00382 #               define GLM_ARCH GLM_ARCH_SSE2
00383 #       else
00384 #               define GLM_ARCH GLM_ARCH_PURE
00385 #       endif
00386 #else
00387 #       define GLM_ARCH GLM_ARCH_PURE
00388 #endif
00389 
00390 #if(GLM_ARCH != GLM_ARCH_PURE)
00391 #if((GLM_ARCH & GLM_ARCH_AVX) == GLM_ARCH_AVX)
00392 #       include <immintrin.h>
00393 #endif//GLM_ARCH
00394 #if((GLM_ARCH & GLM_ARCH_SSE3) == GLM_ARCH_SSE3)
00395 #       include <pmmintrin.h>
00396 #endif//GLM_ARCH
00397 #if((GLM_ARCH & GLM_ARCH_SSE2) == GLM_ARCH_SSE2)
00398 #       include <emmintrin.h>
00399 #endif//GLM_ARCH
00400 #endif//(GLM_ARCH != GLM_ARCH_PURE)
00401 
00402 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))
00403 #       define GLM_MESSAGE_ARCH_DISPLAYED
00404 #       if(GLM_ARCH == GLM_ARCH_PURE)
00405 #               pragma message("GLM: Platform independent")
00406 #       elif(GLM_ARCH == GLM_ARCH_SSE2)
00407 #               pragma message("GLM: SSE2 build platform")
00408 #       elif(GLM_ARCH == GLM_ARCH_SSE3)
00409 #               pragma message("GLM: SSE3 build platform")
00410 #       elif(GLM_ARCH == GLM_ARCH_AVX)
00411 #               pragma message("GLM: AVX build platform")
00412 #       endif//GLM_ARCH
00413 #endif//GLM_MESSAGE
00414 
00416 // Components
00417 
00418 //#define GLM_FORCE_ONLY_XYZW
00419 #define GLM_COMPONENT_GLSL_NAMES                        0 
00420 #define GLM_COMPONENT_ONLY_XYZW                         1 // To disable multiple vector component names access.
00421 #define GLM_COMPONENT_MS_EXT                            2 // To use anonymous union to provide multiple component names access for class valType. Visual C++ only.
00422 
00423 #ifndef GLM_FORCE_ONLY_XYZW
00424 #       if((GLM_COMPILER & GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))
00425 #               define GLM_COMPONENT GLM_COMPONENT_MS_EXT
00426 #       else
00427 #               define GLM_COMPONENT GLM_COMPONENT_GLSL_NAMES
00428 #       endif
00429 #else
00430 #       define GLM_COMPONENT GLM_COMPONENT_ONLY_XYZW
00431 #endif
00432 
00433 #if((GLM_COMPONENT == GLM_COMPONENT_MS_EXT) && !(GLM_COMPILER & GLM_COMPILER_VC))
00434 #       error "GLM_COMPONENT value is GLM_COMPONENT_MS_EXT but this is not allowed with the current compiler."
00435 #endif
00436 
00437 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPONENT_DISPLAYED))
00438 #       define GLM_MESSAGE_COMPONENT_DISPLAYED
00439 #       if(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
00440 #               pragma message("GLM: GLSL multiple vector component names")
00441 #       elif(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
00442 #               pragma message("GLM: x,y,z,w vector component names only")
00443 #       elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
00444 #               pragma message("GLM: Multiple vector component names through Visual C++ language extensions")
00445 #       else
00446 #               error "GLM_COMPONENT value unknown"
00447 #       endif//GLM_MESSAGE_COMPONENT_DISPLAYED
00448 #endif//GLM_MESSAGE
00449 
00451 // Static assert
00452 
00453 #if(GLM_LANG == GLM_LANG_CXX0X)
00454 #       define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
00455 #elif(defined(BOOST_STATIC_ASSERT))
00456 #       define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
00457 #elif(GLM_COMPILER & GLM_COMPILER_VC)
00458 #       define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
00459 #else
00460 #       define GLM_STATIC_ASSERT(x, message)
00461 #       define GLM_STATIC_ASSERT_NULL
00462 #endif//GLM_LANG
00463 
00465 // Qualifiers 
00466 
00467 // User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
00468 
00469 #if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))
00470 #   define GLM_CUDA_FUNC_DEF __device__ __host__ 
00471 #       define GLM_CUDA_FUNC_DECL __device__ __host__ 
00472 #else
00473 #   define GLM_CUDA_FUNC_DEF
00474 #       define GLM_CUDA_FUNC_DECL
00475 #endif
00476 
00477 #if GLM_COMPILER & GLM_COMPILER_GCC
00478 #define GLM_VAR_USED __attribute__ ((unused))
00479 #else
00480 #define GLM_VAR_USED
00481 #endif
00482 
00483 #if(defined(GLM_FORCE_INLINE))
00484 #   if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
00485 #       define GLM_INLINE __forceinline
00486 #   elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))
00487 #       define GLM_INLINE __attribute__((always_inline))
00488 #   else
00489 #       define GLM_INLINE inline
00490 #   endif//GLM_COMPILER
00491 #else
00492 #   define GLM_INLINE inline
00493 #endif//defined(GLM_FORCE_INLINE)
00494 
00495 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
00496 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
00497 
00499 // Swizzle operators
00500 
00501 // User defines: GLM_SWIZZLE_XYZW GLM_SWIZZLE_RGBA GLM_SWIZZLE_STQP GLM_SWIZZLE
00502 
00503 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
00504 #       define GLM_MESSAGE_SWIZZLE_DISPLAYED
00505 #       if(defined(GLM_SWIZZLE))
00506 #               pragma message("GLM: Full swizzling operator enabled")
00507 #       elif(!defined(GLM_SWIZZLE_XYZW) && !defined(GLM_SWIZZLE_RGBA) && !defined(GLM_SWIZZLE_STQP) && !defined(GLM_SWIZZLE))
00508 #               pragma message("GLM: No swizzling operator enabled")
00509 #       else
00510 #               pragma message("GLM: Partial swizzling operator enabled")
00511 #       endif
00512 #endif//GLM_MESSAGE
00513 
00514 #endif//glm_setup