Skip to content
Snippets Groups Projects

Add CMakePresets.json

Merged Bartosz Podrygajlo requested to merge cmake-presets into develop
All threads resolved!

Introduce CMakePresests.json which is a simple way to perform incremental build using cmake

New configure resets were added:

  • default: Configure compilation with default options
  • tests: Same as above but ENABLE_TESTS and SANITIZE_ADDRESS is ON

New build presets were added:

  • 5gdefault: Build the software for NR rfsimulator test
  • default: same as 5gdefault
  • 4gdefault: Build the software for LTE rfsimulator test
  • tests: build all unit tests

To configure using configuration preset:

cmake --preset <preset_name>

To build using a build preset:

cmake --build --preset <preset_name>

Edited by Bartosz Podrygajlo

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Robert Schmidt
  • Robert Schmidt requested changes

    requested changes

  • added 1 commit

    Compare with previous version

  • Robert Schmidt
  • so I tested a user-preset, and I tried to override the 5g preset to build elsewhere. This is what I came up with, let me know if something is missing or incomplete:

    {
        "version": 3,
        "configurePresets": [
            {
                "name": "my5gdefault",
                "inherits": "default",
                "binaryDir": "${sourceDir}/build"
            }
        ],
        "buildPresets": [
            {
                "name": "my5gdefault",
                "configurePreset": "my5gdefault",
                "inherits": "5gdefault"
            }
        ]
    }

    very nice, works. We can later use that for build_oai, and potentially replace the CI build_oai invocations with presets

  • added 1 commit

    Compare with previous version

  • Robert Schmidt resolved all threads

    resolved all threads

  • Robert Schmidt approved this merge request

    approved this merge request

  • changed milestone to %OK_TO_BE_MERGED

  • Bartosz Podrygajlo changed the description

    changed the description

    • Resolved by Robert Schmidt

      Final question, but on the cmake usage. I tried to do both configure&build steps in one, but just giving e.g., the build command line does not work (because that's a superset of the command line options of configure&build). I checked, and there are workflows. Would this be necessary to run both configure&build?

  • Robert Schmidt resolved all threads

    resolved all threads

  • changed milestone to %OK_TO_BE_MERGED

  • mentioned in merge request !3032 (merged)

  • Robert Schmidt mentioned in commit 65d8d410

    mentioned in commit 65d8d410

  • Robert Schmidt merged with merge request !3032 (merged)

    merged with merge request !3032 (merged)

  • Please register or sign in to reply
    Loading