From c5f5e555eeead356ac7f5ed9972f0f12cac198aa Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@43-1.org>
Date: Thu, 12 Jan 2017 11:00:30 -0600
Subject: [PATCH] CMake: Make sure the cuda wrapper only uses -std=c++11

---
 cmake/configure/configure_1_cuda.cmake       | 6 +++++-
 cmake/macros/macro_deal_ii_add_library.cmake | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake
index aec9028c97..98bc523938 100644
--- a/cmake/configure/configure_1_cuda.cmake
+++ b/cmake/configure/configure_1_cuda.cmake
@@ -17,13 +17,17 @@
 # Configuration for cuda support:
 #
 
+#
+# cuda support is experimental. Therefore, disable the feature per default:
+#
+SET(DEAL_II_WITH_CUDA FALSE CACHE BOOL "")
+
 #
 # FindCUDA needs a compiler set up with C++11 support. Thus, only configure
 # if deal.II was configured with C++11 support.
 #
 SET(FEATURE_CUDA_DEPENDS CXX11)
 
-SET(DEAL_II_WITH_CUDA FALSE CACHE BOOL "")
 
 MACRO(FEATURE_CUDA_FIND_EXTERNAL var)
 
diff --git a/cmake/macros/macro_deal_ii_add_library.cmake b/cmake/macros/macro_deal_ii_add_library.cmake
index 5a4c900cdf..3e4a9bf44d 100644
--- a/cmake/macros/macro_deal_ii_add_library.cmake
+++ b/cmake/macros/macro_deal_ii_add_library.cmake
@@ -67,7 +67,9 @@ MACRO(DEAL_II_ADD_LIBRARY _library)
       # CUDA_WRAP_SRCS does not automatically pick up host compiler flags
       # from the target, so we have to feed relevant flags ourselves
       #
-      SET(CMAKE_CXX_FLAGS
+      # Furthermore, C++14 is not yet supported, so filter the flag:
+      #
+      STRING(REPLACE "-std=c++14" "-std=c++11" CMAKE_CXX_FLAGS
         "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
         )
 
-- 
2.39.5