From: Daniel Arndt Date: Thu, 5 Nov 2020 19:55:53 +0000 (-0500) Subject: Allow user to specify CMAKE_CUDA_HOST_COMPILER X-Git-Tag: v9.4.0-rc1~364^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18dbd608b486387a0608ef3e70769570cc855e46;p=dealii.git Allow user to specify CMAKE_CUDA_HOST_COMPILER --- diff --git a/cmake/configure/configure_1_cuda.cmake b/cmake/configure/configure_1_cuda.cmake index cf9a69e98e..d601439741 100644 --- a/cmake/configure/configure_1_cuda.cmake +++ b/cmake/configure/configure_1_cuda.cmake @@ -160,7 +160,9 @@ MACRO(FEATURE_CUDA_CONFIGURE_EXTERNAL) # compiler: # SET(CMAKE_CUDA_COMPILER "${CUDA_NVCC_EXECUTABLE}") - SET(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}") + IF(NOT CMAKE_CUDA_HOST_COMPILER) + SET(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}") + ENDIF() ENABLE_LANGUAGE(CUDA) MARK_AS_ADVANCED(CMAKE_CUDA_HOST_COMPILER) diff --git a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake index 2fe7f4b464..36422dd3ef 100644 --- a/cmake/macros/macro_deal_ii_invoke_autopilot.cmake +++ b/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -46,7 +46,9 @@ MACRO(DEAL_II_INVOKE_AUTOPILOT) # Make sure we can treat CUDA targets if available IF(DEAL_II_WITH_CUDA) - SET(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}") + IF(NOT CMAKE_CUDA_HOST_COMPILER) + SET(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}") + ENDIF() ENABLE_LANGUAGE(CUDA) ENDIF()