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

Complains about valid build preset

    XMLWordPrintable

Details

    • Windows
    • cf8a8974e (13.0)

    Description

      The following CMakePresets.json file:

      {
        "version": 2,
        "configurePresets": [
          {
            "name": "msvc",
            "generator": "Visual Studio 17 2022",
            "architecture": "x64",
            "binaryDir": "${sourceDir}/build/msvc",
            "cacheVariables": {
              "CMAKE_CONFIGURATION_TYPES": "Debug;Release"
            }
          }
        ],
        "buildPresets": [
          { "name": "common",
            "hidden": true
          },
          { "name" : "msvc",
            "inherits" : ["common"],
            "configurePreset" : "msvc"
          }
        ]
      }
      

      when used in QtCreator gives the following warning message:

      error: Build preset common is missing a corresponding configure preset.
      

      but cmake presets documentation states [1]

      If a preset is hidden, it cannot be used in the --preset argument and does not have to have a valid configurePreset, even from inheritance. hidden presets are intended to be used as a base for other presets to inherit via the inherits field.
      

      So I think the error message is incorrect.

      [1]: https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html#build-preset

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-30373
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            t-b Thomas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes