Configuration options

CMake options

Some of these options are enabled by default (“Defaults to ON”) otherwise they must be expicitly set to ON.


CMake switches to enable / disable parts of OGS.

  • OGS_BUILD_CLI - Builds the simulator. Defaults to ON.
  • OGS_BUILD_GUI - Builds the Data Explorer. Defaults to OFF.
  • BUILD_TESTING - Builds the test executables. Defaults to ON.
  • OGS_BUILD_UTILS - Builds several utilities.
  • OGS_NO_EXTERNAL_LIBS - Disables all external optional dependencies.
  • OGS_BUILD_PROCESS_X - For enabling/disabling compilation of process X. Run the CMake-Gui to see a list of processes.
  • OGS_BUILD_PROCESSES - A ;-separated list specifying processes to build. Defaults to an empty string. This will alter the OGS_BUILD_PROCESS_X-options. For e.g. building just the two processes HT and LIE: -DOGS_BUILD_PROCESSES="HT;LIE". Setting this variable back to an empty string does not reset the OGS_BUILD_PROCESS_X-options.


  • CMAKE_BUILD_TYPE - Defaults to Debug which builds with debugging infos, set to Release for an optimized build.
  • OGS_PROFILE - Builds with profiling flags (-pg).
  • OGS_CMAKE_DEBUG - Prints out the values of all defined CMake variables at CMake configuration time.


  • CMAKE_BUILD_TYPE - Set to Release to build with optimization flags, set to Debug for debugging.


  • OGS_DISABLE_LOGGING - Disables all logog output messages. This really strips out all logog-code (useful for performance testing).


  • OGS_COVERAGE - Enables code coverage measurements with gcov/lcov. TODO

Advanced options

  • OGS_CXX_FLAGS - Appends user-given compiler flags. Note that existing (CMake-given) flags are not replaced.
  • OGS_ADDITIONAL_SUBMODULES_TO_CHECKOUT - Specifies optional submodules which are checked out at CMake-time. This is intended to be used by Jenkins.
  • OGS_PACKAGE_ADDITIONAL_BINARIES - Package additional binaries (given as a ;-separated list with relative paths to CMAKE_BINARY_DIR) into redistributables. Is used for bundling the OGS File Converter with the Data Explorer.
  • OGS_USE_OPTIONAL_SUBMODULES - Includes optional submodules into the build. The submodules have to be checked out before. Defaults to ON.
  • OGS_CPU_ARCHITECTURE - Optimizes for the given CPU architecture see -march-flag. Defaults to native. For redistributable binaries set to generic on Linux and core2 on Mac OS.
  • CMAKE_LIBRARY_SEARCH_PATH - Additional library installation path, e.g. /opt/local or C:/libs

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.54.0. Last revision: February 11, 2019
Commit: [CMake] Replace OGS_BUILD_TESTS with BUILD_TESTING. ac7308fbd  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum