Skip to content

CMakeRun always run the debug binary when using Ninja Multi-Config #399

@adriengivry

Description

@adriengivry

Bug description

Whenever a multi-config generator is used (e.g. Ninja Multi-Config), running :CMakeRun will always run the binary in ./build/bin/Debug. Using :CMakeSelectBuildType doesn't change anything. Maybe :CMakeSelectRunConfig should be added?

Steps to reproduce

  1. Create a CMakePresets.json file with a configurePresets entry using the Ninja Multi-Config generator
  2. In the CMakePresets.json, add 2 buildPresets entries, one with "configuration": "Debug", and one with "configuration": "Release"
  3. Run :CMakeGenerate
  4. Run :CMakeSelectBuildPreset and select the release preset you added to your buildPresets.
  5. Run :CMakeBuild
  6. Run :CMakeRun, notice that the binary in ./build/bin/Debug is being ran

Expected behaviour
:CMakeRun should use the binary generated by :CMakeBuild, according to the configuration specified in the buildPresets entry.

Screenshots

N/a

Environment

  • OS: Arch Linux
  • Desktop environment: KDE
  • Plugins commit hash: 98cdc16

Contents in the *cmake-tools* buffer
N/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions