]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update bundled boost to allow to compile with clang-9.0 5349/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 28 Oct 2017 16:32:37 +0000 (18:32 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 28 Oct 2017 16:32:37 +0000 (18:32 +0200)
bundled/boost-1.62.0/include/boost/config/compiler/nvcc.hpp

index 5a047070afe12ac7321facd7d230d5883820f8a6..172558502db633b97654a6db9e5bd1edbc2f3acd 100644 (file)
 #  define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
 #endif
 
+#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
+#  define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__
+#else
+// We don't really know what the CUDA version is, but it's definitely before 7.5:
+#  define BOOST_CUDA_VERSION 7000000
+#endif
+
 // NVIDIA Specific support
 // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
 #define BOOST_GPU_ENABLED __host__ __device__
 // https://svn.boost.org/trac/boost/ticket/11897
 // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
 // check is enough to detect versions < 7.5
-#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
+#if BOOST_CUDA_VERSION < 7050000
 #   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
 #endif
+// The same bug is back again in 8.0:
+#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
+#   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+// Most recent CUDA (8.0) has no constexpr support in msvc mode:
+#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,
+// See https://svn.boost.org/trac/boost/ticket/13049
+//
+#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
+#  define BOOST_NO_CXX11_NOEXCEPT
+#endif
+
+#endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.