mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Clang detection for GLM_INLINE
This commit is contained in:
parent
c868666c79
commit
efcecbd81a
@ -378,12 +378,12 @@ namespace detail
|
|||||||
# define GLM_RESTRICT_VAR __restrict
|
# define GLM_RESTRICT_VAR __restrict
|
||||||
# define GLM_CONSTEXPR
|
# define GLM_CONSTEXPR
|
||||||
#elif(GLM_COMPILER & GLM_COMPILER_INTEL)
|
#elif(GLM_COMPILER & GLM_COMPILER_INTEL)
|
||||||
# define GLM_DEPRECATED
|
# define GLM_DEPRECATED
|
||||||
# define GLM_ALIGN(x) __declspec(align(x))
|
# define GLM_ALIGN(x) __declspec(align(x))
|
||||||
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
|
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
|
||||||
# define GLM_RESTRICT
|
# define GLM_RESTRICT
|
||||||
# define GLM_RESTRICT_VAR __restrict
|
# define GLM_RESTRICT_VAR __restrict
|
||||||
# define GLM_CONSTEXPR
|
# define GLM_CONSTEXPR
|
||||||
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
|
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
|
||||||
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
# define GLM_DEPRECATED __attribute__((__deprecated__))
|
||||||
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
# define GLM_ALIGN(x) __attribute__((aligned(x)))
|
||||||
|
@ -686,29 +686,31 @@
|
|||||||
// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
|
// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
|
||||||
|
|
||||||
#if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))
|
#if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))
|
||||||
# define GLM_CUDA_FUNC_DEF __device__ __host__
|
# define GLM_CUDA_FUNC_DEF __device__ __host__
|
||||||
# define GLM_CUDA_FUNC_DECL __device__ __host__
|
# define GLM_CUDA_FUNC_DECL __device__ __host__
|
||||||
#else
|
#else
|
||||||
# define GLM_CUDA_FUNC_DEF
|
# define GLM_CUDA_FUNC_DEF
|
||||||
# define GLM_CUDA_FUNC_DECL
|
# define GLM_CUDA_FUNC_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLM_COMPILER & GLM_COMPILER_GCC
|
#if GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
#define GLM_VAR_USED __attribute__ ((unused))
|
# define GLM_VAR_USED __attribute__ ((unused))
|
||||||
#else
|
#else
|
||||||
#define GLM_VAR_USED
|
# define GLM_VAR_USED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(defined(GLM_FORCE_INLINE))
|
#if(defined(GLM_FORCE_INLINE))
|
||||||
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
# if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
|
||||||
# define GLM_INLINE __forceinline
|
# define GLM_INLINE __forceinline
|
||||||
# elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))
|
# elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))
|
||||||
# define GLM_INLINE __attribute__((always_inline))
|
# define GLM_INLINE __attribute__((always_inline))
|
||||||
# else
|
# elif(GLM_COMPILER & GLM_COMPILER_CLANG)
|
||||||
# define GLM_INLINE inline
|
# define GLM_INLINE __attribute__((always_inline))
|
||||||
# endif//GLM_COMPILER
|
# else
|
||||||
|
# define GLM_INLINE inline
|
||||||
|
# endif//GLM_COMPILER
|
||||||
#else
|
#else
|
||||||
# define GLM_INLINE inline
|
# define GLM_INLINE inline
|
||||||
#endif//defined(GLM_FORCE_INLINE)
|
#endif//defined(GLM_FORCE_INLINE)
|
||||||
|
|
||||||
#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
|
#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
|
||||||
|
Loading…
Reference in New Issue
Block a user