]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warnings when using cmake 3.18 10856/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 9 Sep 2020 17:50:55 +0000 (17:50 +0000)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Thu, 10 Sep 2020 00:54:23 +0000 (00:54 +0000)
cmake/config/Config.cmake.in
cmake/configure/configure_1_cuda.cmake

index e9323ffe484c36ef6f4eb5b645565c1c621df376..af42960d373fc428ab07bfcfe5b1223954ea2d54 100644 (file)
@@ -149,6 +149,11 @@ SET(DEAL_II_MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@")
 SET(DEAL_II_MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@")
 SET(DEAL_II_MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@")
 
+#
+# CUDA specific setup:
+#
+SET(CMAKE_CUDA_ARCHITECTURES "@CMAKE_CUDA_ARCHITECTURES@")
+
 #
 # Build a static executable:
 #
index dffca252dc87e4811d58daaad4fd348398573a88..cf9a69e98e2243b8f5cdda473f4b40e52b4a77f5 100644 (file)
@@ -173,6 +173,13 @@ MACRO(FEATURE_CUDA_CONFIGURE_EXTERNAL)
   SET(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 0)
   SET(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 0)
 
+  #
+  # Disable CUDA_ARCHITECTURES target properties
+  #
+  IF(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
+    SET(CMAKE_CUDA_ARCHITECTURES OFF)
+  ENDIF()
+
   # We cannot use -pedantic as compiler flags. nvcc generates code that
   # produces a lot of warnings when pedantic is enabled. So filter out the
   # flag:

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.