Skip to content

Change back to out-of-source builds

Lars Bilke requested to merge bilke/ogs:out-of-source into master

CMake presets (!3428 (merged)) introduced in-source builds:

- ogs
  - build
    - release
    - debug

This MR changes the presets and adapts CI to out-of-source builds:

- ogs
- build
  - release
  - debug

The reason for this change seems to be a bug in CMake where the CMake-variable PROJECT_SOURCE_DIR gets messed up when

  • we have an in-source build AND
  • we add sub-project via add_subdirectory() which are outside the users home-directory.

This happens when we use CPM (!3458 (closed)) and we use a system-wide CPM cache.


Also exclude ci config files from pre-commit check. The check does not recognize the new !reference-syntax and ci config files are checked by GitLab CI itself.

Symlinking the build dir into the source dir is required for CI artifact archival (GitLab does not allow artifacts outside the jobs root directory).


  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