Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
O
ogs
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 41
    • Issues 41
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 24
    • Merge Requests 24
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ogs
  • ogs
  • Merge Requests
  • !3428

Merged
Created Feb 01, 2021 by Lars Bilke@bilkeDeveloper7 of 7 tasks completed7/7 tasks

CMake presets

  • Overview 11
  • Commits 16
  • Pipelines 23
  • Changes 29

Make use of CMake presets. Using this requires CMake 3.19.

Build configuration presets are defined in CMakePresets.json

Usage:

# In OGS source code directory
cmake -S . --preset release

This will create a configured build in ogs/build/release with the Ninja generator and some predefined options.

Developer can create a CMakeUserPresets.json file in the root source directory with their own presets (this file is ignored by git).

Documentation preview


  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?

Things to discuss:

  • Shall the build be in-source (ogs/build/[config-name]) or not (ogs/../build-[config-name])?
  • Is the preset naming scheme good? [generator]-[release|debug]-[gui|petsc|...], see name-field in CMakePresets.json.
  • Are there any useful presets missing?
  • Shall the top-level default CMake options in the default preset (release) also become the defaults in CMake in general? (OGS_BUILD_UTILS and OGS_USE_PYTHON)
Edited Feb 03, 2021 by Lars Bilke
Assignee
Assign to
Reviewer
Request review from
6.4.0
Milestone
6.4.0 (Past due)
Assign milestone
Time tracking
Source branch: cmake-presets