From 99f1e5ebfdf19fe18b75608c0df50b29a2415f4f Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 6 Nov 2018 10:57:49 +0100
Subject: [PATCH] [web] Added note on CMake command line vs gui usage.

---
 .../docs/devguide/troubleshooting/cmake.pandoc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/web/content/docs/devguide/troubleshooting/cmake.pandoc b/web/content/docs/devguide/troubleshooting/cmake.pandoc
index 2c9e35b89ba..72c2513482b 100644
--- a/web/content/docs/devguide/troubleshooting/cmake.pandoc
+++ b/web/content/docs/devguide/troubleshooting/cmake.pandoc
@@ -15,4 +15,22 @@ If something goes wrong when running CMake please try again with an **empty** or
 
 Please read the CMake output carefully. Often it will tell you what went wrong.
 
+Also consider using the command line for CMake configuration as lots of CMake options (which modify requirements on third-party libraries) have to be set via the command line **before** CMake ran for the first time. E.g. when building with PETSc the following fails:
+
+- Creating build directory
+- Starting CMake Gui
+- Click Configure
+- Enable option `OGS_USE_PETSC`
+
+When clicking *Configure*, CMake runs without `OGS_USE_PETSC` enabled and picks a VTK library which is not compiled for MPI usage. The picked VTK library is cached and never modified. So when enabling PETSc it still uses the old (and now wrong) VTK library.
+
+So you have to use the CMake command line:
+
+```bash
+mkdir build
+cd build
+cmake ../ogs -DOGS_USE_PETSC=ON
+make
+```
+
 Check also [Conans troubleshooting page]({{< ref "conan.pandoc" >}}) if you use Conan for dependencies.
-- 
GitLab