]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check for cuda only if configured with cuda support. 4402/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 17 May 2017 20:31:39 +0000 (16:31 -0400)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 17 May 2017 20:31:39 +0000 (16:31 -0400)
cmake/macros/macro_deal_ii_add_test.cmake

index b1dfff8c613f174ebc487e116b39ef47eab5d4b4..2036b2d9d4cff40377bc73559751c432ab577151 100644 (file)
@@ -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}

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.