From 2fa52325acd8a976f0da0e92595fbf1566c50316 Mon Sep 17 00:00:00 2001
From: Soeren Peters <peters@irmb.tu-bs.de>
Date: Thu, 27 Aug 2020 17:57:09 +0200
Subject: [PATCH] Increase required version to 3.18 and set the cmake policy
 CMPI0104 to NEW. Therefore the CMAKE_CUDA_ARCHITECTURES needs to be set.

---
 CMakeLists.txt | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b1cb33e7c..407d18ba5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,7 @@
 #  required cmake versions
 #  CMAKE 3.9: CUDA support
 #################################################################################
-cmake_minimum_required(VERSION 3.13..3.17 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.13..3.18 FATAL_ERROR)
 
 project(VirtualFluids CXX)
 
@@ -31,6 +31,16 @@ option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF)
 
 option(BUILD_SHARED_LIBS "" ON)
 
+#################################################################################
+#  CMAKE POLICIES
+#################################################################################
+# CMAKE_CUDA_ARCHITECTURES
+# https://cmake.org/cmake/help/git-stage/policy/CMP0104.htmls
+if(POLICY CMP0104)
+    cmake_policy(SET CMP0104 NEW)
+    set(CMAKE_CUDA_ARCHITECTURES 30)
+endif()
+
 #################################################################################
 #  MACROS
 #################################################################################
-- 
GitLab