From: Matthias Maier Date: Tue, 15 Aug 2017 06:39:52 +0000 (-0500) Subject: Add CUDA setup to DEAL_II_INITIALIZE_CACHED_VARIABLES X-Git-Tag: v9.0.0-rc1~1235^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51e0af10070aea1659f5ea221bec07cbb41f763e;p=dealii.git Add CUDA setup to DEAL_II_INITIALIZE_CACHED_VARIABLES --- diff --git a/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake b/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake index 0df86b033a..ff9a2a859a 100644 --- a/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake +++ b/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake @@ -84,23 +84,31 @@ MACRO(DEAL_II_INITIALIZE_CACHED_VARIABLES) SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.") - - SET(CMAKE_C_COMPILER ${DEAL_II_C_COMPILER} CACHE STRING - "C Compiler.") - SET(CMAKE_CXX_FLAGS "" CACHE STRING "Flags used by the compiler during all build types." ) - SET(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING "Flags used by the compiler during debug builds." ) - SET(CMAKE_CXX_FLAGS_RELEASE "" CACHE STRING "Flags used by the compiler during release builds." ) + + IF(DEAL_II_WITH_CUDA) + SET(CMAKE_CUDA_COMPILER ${DEAL_II_CUDA_COMPILER} CACHE STRING + "CUDA Compiler.") + SET(CMAKE_CUDA_FLAGS "" CACHE STRING + "Flags used by the compiler during all build types." + ) + SET(CMAKE_CUDA_FLAGS_DEBUG "" CACHE STRING + "Flags used by the compiler during debug builds." + ) + SET(CMAKE_CUDA_FLAGS_RELEASE "" CACHE STRING + "Flags used by the compiler during release builds." + ) + ENDIF() + MARK_AS_ADVANCED(CMAKE_INSTALL_PREFIX) ENDMACRO() - diff --git a/tests/setup_testsubproject.cmake b/tests/setup_testsubproject.cmake index e368c7297f..13657ade97 100644 --- a/tests/setup_testsubproject.cmake +++ b/tests/setup_testsubproject.cmake @@ -9,10 +9,7 @@ FOREACH(_var DIFF_DIR NUMDIFF_DIR TEST_PICKUP_REGEX TEST_TIME_LIMIT) ENDFOREACH() IF(DEAL_II_WITH_CUDA) - PROJECT(blubb) - SET(CUDA_TOOLKIT_ROOT_DIR "${DEAL_II_CUDA_TOOLKIT_ROOT_DIR}") - FIND_PACKAGE(CUDA REQUIRED) - ENABLE_LANGUAGE(CUDA) + PROJECT(TESTSUITE CXX CUDA) ENDIF() #