From f0f95bd3dea426c32be48698627aeccd113ebdef Mon Sep 17 00:00:00 2001 From: Robert Chisholm Date: Thu, 13 May 2021 22:13:04 +0100 Subject: [PATCH 1/3] Correctly detect NVRTC and lack of stl support. --- glm/detail/setup.hpp | 2 ++ glm/simd/platform.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index a6bfec8a..4831f577 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -142,6 +142,8 @@ // Android has multiple STLs but C++11 STL detection doesn't always work #284 #564 #if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED) # define GLM_HAS_CXX11_STL 0 +#elif GLM_COMPILER & GLM_COMPILER_CUDA_RTC +# define GLM_HAS_CXX11_STL 0 #elif GLM_COMPILER & GLM_COMPILER_CLANG # if (defined(_LIBCPP_VERSION) || (GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED)) # define GLM_HAS_CXX11_STL 1 diff --git a/glm/simd/platform.h b/glm/simd/platform.h index ad25cc15..63f863bd 100644 --- a/glm/simd/platform.h +++ b/glm/simd/platform.h @@ -122,7 +122,9 @@ # if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA) # include // make sure version is defined since nvcc does not define it itself! # endif -# if CUDA_VERSION >= 8000 +# if defined(__CUDACC_RTC__) +# define GLM_COMPILER GLM_COMPILER_CUDA_RTC +# elif CUDA_VERSION >= 8000 # define GLM_COMPILER GLM_COMPILER_CUDA80 # elif CUDA_VERSION >= 7500 # define GLM_COMPILER GLM_COMPILER_CUDA75 From aa7380ae123df24eaed86837c918bad214a79996 Mon Sep 17 00:00:00 2001 From: Robert Chisholm Date: Thu, 13 May 2021 22:33:49 +0100 Subject: [PATCH 2/3] Fix lint. --- glm/simd/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/simd/platform.h b/glm/simd/platform.h index 63f863bd..b2f89918 100644 --- a/glm/simd/platform.h +++ b/glm/simd/platform.h @@ -122,7 +122,7 @@ # if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA) # include // make sure version is defined since nvcc does not define it itself! # endif -# if defined(__CUDACC_RTC__) +# if defined(__CUDACC_RTC__) # define GLM_COMPILER GLM_COMPILER_CUDA_RTC # elif CUDA_VERSION >= 8000 # define GLM_COMPILER GLM_COMPILER_CUDA80 From 948ac3b82524f598c9aa2e3c21f4b3d4b543bc7d Mon Sep 17 00:00:00 2001 From: Robert Chisholm Date: Fri, 14 May 2021 10:38:02 +0100 Subject: [PATCH 3/3] Add missing statement. Didn't copy this across, good thing CI caught it. --- glm/simd/platform.h | 1 + 1 file changed, 1 insertion(+) diff --git a/glm/simd/platform.h b/glm/simd/platform.h index b2f89918..d1495299 100644 --- a/glm/simd/platform.h +++ b/glm/simd/platform.h @@ -80,6 +80,7 @@ #define GLM_COMPILER_CUDA75 0x10000001 #define GLM_COMPILER_CUDA80 0x10000002 #define GLM_COMPILER_CUDA90 0x10000004 +#define GLM_COMPILER_CUDA_RTC 0x10000100 // SYCL #define GLM_COMPILER_SYCL 0x00300000