From 09f1d4632eeb34323cfbc8c415b9f48a0461c281 Mon Sep 17 00:00:00 2001
From: Timo Koch <timokoch@uio.no>
Date: Fri, 6 Dec 2024 22:31:04 +0100
Subject: [PATCH] [cmake] No need to enable all. dumux_add_test links to dumux
 libs

---
 CMakeLists.txt | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99439a80..35f5d829 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 # SPDX-FileCopyrightInfo: Copyright © DuMux-Lecture contributors, see AUTHORS.md in root folder
 # SPDX-License-Identifier: GPL-3.0-or-later
 
-cmake_minimum_required(VERSION 3.16)
+cmake_minimum_required(VERSION 3.22)
 
 project("dumux-lecture" C CXX)
 
@@ -23,12 +23,17 @@ include(DuneMacros)
 
 # start a dune project with information from dune.module
 dune_project()
-dune_enable_all_packages()
 
-find_file(DUMUX_RUNTEST NAMES runtest.py HINTS ${dumux_INCLUDE_DIRS} PATH_SUFFIXES bin/testing bin REQUIRED NO_DEFAULT_PATH)
+# find test executable
+find_file(DUMUX_RUNTEST
+  NAMES runtest.py
+  HINTS ${dumux_INCLUDE_DIRS}
+  PATH_SUFFIXES bin/testing bin
+  REQUIRED NO_DEFAULT_PATH
+)
 
 add_subdirectory(lecture EXCLUDE_FROM_ALL)
 add_subdirectory(dumux)
 
 # finalize the dune project, e.g. generating config.h etc.
-finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
+finalize_dune_project()
-- 
GitLab