Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29076

CMake presets: Transitive inheritance of configure presets not working properly

    XMLWordPrintable

Details

    • 65a1637d6 (10.0)

    Description

      Transitive inheritance of generator, binary path, condition and CMake cache variables does not work properly. With this CMakePresets.json file

      {
        "version": 3,
        "configurePresets": [
          {
            "name": "level 0",
            "binaryDir": "${sourceDir}/build/${presetName}",
            "generator": "Ninja Multi-Config",
            "hidden": true,
            "cacheVariables": {
              "FOO": "BAR"
            },
            "condition": {
                "type": "const",
                "value": false
            }
          },
          {
            "name": "level 1",
            "inherits": "level 0",
            "cacheVariables": {
              "BAR": "BAZ"
            }
          },
          {
            "name": "level 2",
            "inherits": "level 1"
          }
        ]
      }

      instead of not showing any preset, the level 2 preset is shown, and its generator and binary path use the default values instead of those specified in the "level 0" preset. Moreover, when configuring a project with the level 2 preset only the CMake cache variable BAR defined in the level 1 preset is set, but the FOO variable from the level 0 preset isn't.

      I have not checked whether properties other than these 4 (e.g. env variables) are affected, too, but I suspect they are.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cadam Cristian Adam
            berglerma Manuel Bergler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes