From 7bbb31ee982b2c03659d18ae46cc7ef0b48347d8 Mon Sep 17 00:00:00 2001 From: Bruno Turcksin Date: Wed, 17 May 2017 16:31:39 -0400 Subject: [PATCH] Check for cuda only if configured with cuda support. --- cmake/macros/macro_deal_ii_add_test.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index b1dfff8c61..2036b2d9d4 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -250,9 +250,11 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file) COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${_target}/interrupt_guard.cc ) - FIND_PACKAGE(CUDA) - CUDA_INCLUDE_DIRECTORIES("${DEAL_II_INCLUDE_DIRS}") - CUDA_WRAP_SRCS( ${_target} OBJ _generated_files ${_source_file} ) + IF(DEAL_II_WITH_CUDA) + FIND_PACKAGE(CUDA) + CUDA_INCLUDE_DIRECTORIES("${DEAL_II_INCLUDE_DIRS}") + CUDA_WRAP_SRCS( ${_target} OBJ _generated_files ${_source_file} ) + ENDIF() ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${_generated_files} -- 2.39.5