From 9910b354e52070f4cfe188ce9b27aaa3665d6888 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 15 Jun 2017 13:04:18 +0100 Subject: [PATCH] CUDA: disable some C++11 and 14 features which aren't supported when compiling as a .cu file. --- include/boost/config/compiler/nvcc.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp index b31d4f4f..283b7803 100644 --- a/include/boost/config/compiler/nvcc.hpp +++ b/include/boost/config/compiler/nvcc.hpp @@ -30,3 +30,19 @@ #if defined(_MSC_VER) # define BOOST_NO_CXX11_CONSTEXPR #endif + +#ifdef __CUDACC__ +// +// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc: +// +#if defined(_MSC_VER) +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif +// +// And this one effects the NVCC front end: +// +#define BOOST_NO_CXX11_NOEXCEPT + +#endif +