From 03a6b33a601298f23182352032b9e449fe477fa2 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 27 Apr 2021 15:12:28 +0200
Subject: [PATCH] [cmake] Added build presets.

Requires CMake 3.20.

See https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset
---
 CMakePresets.json | 58 +++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 56 insertions(+), 2 deletions(-)

diff --git a/CMakePresets.json b/CMakePresets.json
index 0e28a4c22f5..8a89374682d 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -1,8 +1,8 @@
 {
-  "version": 1,
+  "version": 2,
   "cmakeMinimumRequired": {
     "major": 3,
-    "minor": 19,
+    "minor": 20,
     "patch": 0
   },
   "configurePresets": [
@@ -173,5 +173,59 @@
         "OGS_USE_POETRY": "OFF"
       }
     }
+  ],
+  "buildPresets": [
+    {
+      "name": "release",
+      "configurePreset": "release"
+    },
+    {
+      "name": "debug",
+      "configurePreset": "debug"
+    },
+    {
+      "name": "release-gui",
+      "configurePreset": "release-gui",
+      "targets": [
+        "DataExplorer"
+      ]
+    },
+    {
+      "name": "debug-gui",
+      "configurePreset": "debug-gui",
+      "targets": [
+        "DataExplorer"
+      ]
+    },
+    {
+      "name": "release-petsc",
+      "configurePreset": "release-petsc"
+    },
+    {
+      "name": "debug-petsc",
+      "configurePreset": "debug-petsc"
+    },
+    {
+      "name": "msvc-release",
+      "configurePreset": "msvc-release"
+    },
+    {
+      "name": "msvc-debug",
+      "configurePreset": "msvc-debug"
+    },
+    {
+      "name": "msvc-release-gui",
+      "configurePreset": "msvc-release-gui",
+      "targets": [
+        "DataExplorer"
+      ]
+    },
+    {
+      "name": "msvc-debug-gui",
+      "configurePreset": "msvc-debug-gui",
+      "targets": [
+        "DataExplorer"
+      ]
+    }
   ]
 }
-- 
GitLab