From d25d0641314ea91d6c40129bb96b4584ca9bcc81 Mon Sep 17 00:00:00 2001 From: Karl Ljungkvist Date: Wed, 18 May 2016 11:21:10 -0500 Subject: [PATCH] Move check for C++11 inside if case to not affect non-cuda configuration --- cmake/configure/configure_1_cuda.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake index e372b709bc..4d16b2fbfe 100644 --- a/cmake/configure/configure_1_cuda.cmake +++ b/cmake/configure/configure_1_cuda.cmake @@ -19,15 +19,17 @@ 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) + + 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() + SET(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE FALSE) # Activate C++11 since we require it above. -- 2.39.5