Skip to content

[cmake] Refactored (and fixed) processes setup logic.

Lars Bilke requested to merge bilke/ogs:cmake-processes into master
  • Fixed OGS_BUILD_PROCESSES with multiple values.
  • OGS_BUILD_PROCESSES is now a temporary variable (not cached between CMake runs) and should be set via cli only.
  • OGS_BUILD_PROCESSES overrides individual OGS_BUILD_PROCESS_X-variables:
    • -DOGS_BUILD_PROCESSES=ON --> all OGS_BUILD_PROCESS_X set to ON.
    • -DOGS_BUILD_PROCESSES=OFF --> all OGS_BUILD_PROCESS_X set to OFF.
    • e.g. -DOGS_BUILD_PROCESSES="HT;TH2M" --> OGS_BUILD_PROCESS_HT and OGS_BUILD_PROCESS_TH2M set to ON, all others set to OFF.

I would like to keep the previous implementation in this MR in the git history.

Before this change:

One could use the CMake variables OGS_BUILD_PROCESSES or OGS_BUILD_PROCESS_XYZ but behavior was not consistent when switching back and forth and using both methods. Also building multiple processes via OGS_BUILD_PROCESSES was broken.

Now changed:

  • Removed OGS_BUILD_PROCESS_XYZ options.
  • Use OGS_BUILD_PROCESSES with the following values:
    • ON -> All processes are built.
    • OFF -> Disable all processes.
    • Select a single process by name, e.g. TH2M.
    • Give a ;-separated list of processes, e.g. "THM;TH2M"
  • OGS_BUILD_PROCESSES can be set via ccmake or cmake-gui with a convenient dropdown, although setting multiple processes can only be done via the cli!
  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?
Edited by Lars Bilke

Merge request reports

Loading