CMake

General advice

If something goes wrong when running CMake please try again with an empty or newly created build-directory! This is very first thing you should try!

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:

Check also Conans troubleshooting page if you use Conan for dependencies.


Previous
Next

This article was written by Lars Bilke. If you are missing something or you find an error please let us know. Generated with Hugo 0.47.1. Last revision: November 6, 2018
Commit: [web] Added note on CMake command line vs gui usage. 99f1e5ebf  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum