Automatic detection of the CUDA compiler?

This commit is contained in:
Christophe Riccio 2011-05-09 17:42:29 +01:00
parent 7c67703bca
commit 6d19231a70

View File

@ -88,6 +88,23 @@
// Force generic C++ compiler // Force generic C++ compiler
#ifdef GLM_FORCE_COMPILER_UNKNOWN #ifdef GLM_FORCE_COMPILER_UNKNOWN
# define GLM_COMPILER GLM_COMPILER_UNKNOWN # define GLM_COMPILER GLM_COMPILER_UNKNOWN
// CUDA
#elif defined(__CUDACC__)
# if CUDA_VERSION < 3000
# error "GLM requires CUDA 3.0 or higher"
# elif CUDA_VERSION == 3000
# define GLM_COMPILER GLM_COMPILER_CUDA30
# elif CUDA_VERSION == 3010
# define GLM_COMPILER GLM_COMPILER_CUDA31
# elif CUDA_VERSION == 3020
# define GLM_COMPILER GLM_COMPILER_CUDA32
# elif CUDA_VERSION == 4000
# define GLM_COMPILER GLM_COMPILER_CUDA40
# else
# define GLM_COMPILER GLM_COMPILER_CUDA
# endif
// Visual C++ // Visual C++
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
# if _MSC_VER == 900 # if _MSC_VER == 900
@ -168,24 +185,6 @@
#elif defined(__MWERKS__) #elif defined(__MWERKS__)
# define GLM_COMPILER GLM_COMPILER_CODEWARRIOR # define GLM_COMPILER GLM_COMPILER_CODEWARRIOR
// CUDA
/*
#elif defined(__CUDACC__)
# if CUDA_VERSION < 3000
# error "GLM requires CUDA 3.0 or higher"
# elif CUDA_VERSION == 3000
# define GLM_COMPILER GLM_COMPILER_CUDA30
# elif CUDA_VERSION == 3010
# define GLM_COMPILER GLM_COMPILER_CUDA31
# elif CUDA_VERSION == 3020
# define GLM_COMPILER GLM_COMPILER_CUDA32
# elif CUDA_VERSION == 4000
# define GLM_COMPILER GLM_COMPILER_CUDA40
# else
# define GLM_COMPILER GLM_COMPILER_CUDA
# endif
*/
#else #else
# define GLM_COMPILER GLM_COMPILER_UNKNOWN # define GLM_COMPILER GLM_COMPILER_UNKNOWN
#endif #endif