From: Karl Ljungkvist Date: Mon, 16 May 2016 19:46:59 +0000 (-0500) Subject: enable C++11 for CUDA X-Git-Tag: v8.5.0-rc1~1036^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2605%2Fhead;p=dealii.git enable C++11 for CUDA --- diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake index b55c04789c..e372b709bc 100644 --- a/cmake/configure/configure_1_cuda.cmake +++ b/cmake/configure/configure_1_cuda.cmake @@ -18,11 +18,24 @@ # 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()