Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,168
    • Issues 4,168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #21311
Closed
Open
Issue created Oct 14, 2020 by Craig Scott@craig.scottMaintainer

Presets: Using preset with path argument to cmake doesn't work as expected

Minimal CMakeUserPresets.json to reproduce the problem:

{
  "version": 1,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 19,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "Base",
      "hidden": true,
      "binaryDir": "build"
    },
    {
      "name": "Debug",
      "inherits": "Base",
      "generator": "Ninja"
    }
  ]
}

Run cmake from the source directory like so:

cmake --preset=Debug .

Expected behavior: The build directory will be in build below the source directory.

Actual behavior: The source directory is used as the build directory. In other words, the binaryDir field is ignored instead of being inherited from the Base preset`.

Edited Oct 19, 2020 by Kyle Edwards
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking