]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Allow user to specify CMAKE_CUDA_HOST_COMPILER 11148/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 5 Nov 2020 19:55:53 +0000 (14:55 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 5 Nov 2020 19:56:46 +0000 (14:56 -0500)
cmake/configure/configure_1_cuda.cmake
cmake/macros/macro_deal_ii_invoke_autopilot.cmake

index cf9a69e98e2243b8f5cdda473f4b40e52b4a77f5..d601439741f8a7565802d65b2bfdbe95206f1cad 100644 (file)
@@ -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)
index 2fe7f4b464045082e14269fd27861e5826901fdf..36422dd3ef5caede33ab68ce26f6132cbd2fc0d8 100644 (file)
@@ -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()
 

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.