]> https://gitweb.dealii.org/ - dealii.git/commitdiff
enable C++11 for CUDA 2605/head
authorKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 16 May 2016 19:46:59 +0000 (14:46 -0500)
committerKarl Ljungkvist <k.ljungkvist@gmail.com>
Mon, 16 May 2016 20:17:28 +0000 (15:17 -0500)
cmake/configure/configure_1_cuda.cmake

index b55c04789ccacdc3de22fb5a698bbed507d444a7..e372b709bc91a3086eb43c2a91fd636cfdf37e24 100644 (file)
 #
 
 MACRO(FEATURE_CUDA_FIND_EXTERNAL var)
+
+  IF(NOT DEAL_II_WITH_CXX11)
+    MESSAGE(FATAL_ERROR "\n"
+      "CUDA only supported with C++11. Reconfigure with DEAL_II_WITH_CXX11=ON.\n"
+      )
+  ENDIF()
+
   FIND_PACKAGE(CUDA)
 
   IF(CUDA_FOUND)
     SET(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE FALSE)
 
+    # Activate C++11 since we require it above.
+
+    SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -std=c++11)
+
+    # FIXME: CUDA compiler NVCC doesn't support C++14.
+
     SET(${var} TRUE)
   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.