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

CMakePresets.json : settings of presets are lost after inheritance from included file

    XMLWordPrintable

Details

    • 15e1a6476 (10.0)

    Description

      I'd like to keep common base settings together.

      If you add base preset like (CMakePresetsBase.json)

      {
        "version": 4,
        "configurePresets": [
          {
            "name": "Linux-CPP-only-toolset-configure",
            "hidden": true,
            "generator": "Unix Makefiles",
            "binaryDir": "${sourceDir}/build/${generator}/${presetName}",
            "environment":

      {         "PATH": "/opt/rh/gcc-toolset-11/root/usr/bin:$penv\{PATH}

      ",
              "CXX": "g++",
              "CC": "gcc"
            }
          }
        ],
        "buildPresets": [
          {
            "name": "Linux-CPP-only-toolset-build",
            "hidden": true,
            "verbose": true,
            "jobs": 4,
            "environment":

      {         "PATH": "/opt/rh/gcc-toolset-11/root/usr/bin:$penv\{PATH}

      ",
              "CXX": "g++",
              "CC": "gcc"
            }
          }
        ]
      }

       

      And then try include this file and try to inherit from these presets - following settings will be lost:

      1. environment
      2. binary dir
      3. generator
      4. verbose
      5. jobs

      ...

      Basically you will lose everything.

      Command line calls of cmake work as expected.
      cmake --preset=Release

      cmake --build --preset=Release

      Attachments

        Issue Links

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

          Activity

            People

              cadam Cristian Adam
              paval Paval Liavonau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes