From: Bruno Turcksin Date: Wed, 17 May 2017 20:31:39 +0000 (-0400) Subject: Check for cuda only if configured with cuda support. X-Git-Tag: v9.0.0-rc1~1585^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bbb31ee982b2c03659d18ae46cc7ef0b48347d8;p=dealii.git Check for cuda only if configured with cuda support. --- 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}