Author: Robert Mijakovic <robert.mijakovic@lxp.lu>
Adds newly supported code generation for CUDA 11.
diff -Naur DualSPHysics-5.0.175/src/source/CMakeLists.txt DualSPHysics-5.0.175/src/source/CMakeLists.txt
--- DualSPHysics-5.0.175/src/source/CMakeLists.txt	2021-02-25 18:46:13.000000000 +0100
+++ DualSPHysics-5.0.175/src/source/CMakeLists.txt	2021-10-13 18:46:17.000000000 +0200
@@ -52,9 +52,12 @@
   elseif(CUDA_VERSION VERSION_GREATER "7.4" AND CUDA_VERSION VERSION_LESS "9.1")
     message("Using cuda version >=7.5 and <9.1")
     list(APPEND CUDA_NVCC_FLAGS "-use_fast_math -O3  -gencode=arch=compute_20,code=\"sm_20,compute_20\" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\"")
-  else()
-    message("Using cuda version >=9.1")
+  elseif(CUDA_VERSION VERSION_GREATER "9.1" AND CUDA_VERSION VERSION_LESS "11.1")
+    message("Using cuda version >=9.1 and <11.1")
     list(APPEND CUDA_NVCC_FLAGS "-use_fast_math -O3  -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\"")
+  else()
+    message("Using cuda version >=11.1")
+    list(APPEND CUDA_NVCC_FLAGS "-use_fast_math -O3  -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" -gencode=arch=compute_80,code=\"sm_80,compute_80\"")
   endif()
 else()
   message("CUDA Libraries were not found.")
@@ -201,4 +204,4 @@
       string(REGEX REPLACE "/MD" "/MT" ${CPP_FLAGS} "${${CPP_FLAGS}}")
     endif(${CPP_FLAGS} MATCHES "/MD")
   endforeach(CPP_FLAGS)
-endif()
\ No newline at end of file
+endif()
