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

[QBS] Allow to use custom build configurations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • Qt Creator 4.9.2
    • None
    • All

    Description

      A QBS support different build configurations (not only a 'debug' or 'release): https://doc-snapshots.qt.io/qbs/cli-build.html

      For this purpose, to build an application, we can use the following command line:

      qbs build config:my-cool-config-name
      

      F.e. this code example:

      import qbs
      
      CppApplication {
          name: "HelloWorld-minimal"
      
          Properties {
              condition: qbs.configurationName === "debug"
              files: "main.cpp"
          }
      
          Properties {
              condition: qbs.configurationName === "foo"
              files: "foo.cpp"
          }
      
          Properties {
              condition: qbs.configurationName === "bar"
              files: "bar.cpp"
          }
      }
      

      can be built with this command lines:

      qbs build config:debug
      qbs build config:foo
      qbs build config:bar
      

      So, I expect, that adding to the "QtC -> Build Settings -> Edit Build configuration -> Add -> foo" will build my project with 'config:foo' property. But, but it is does not work as expected.

      From QtC I see that an "equivalent command line" is:

      C:\Qt-meta\Tools\QtCreator\bin\qbs.exe build -d D:\ng\foo -f D:\Git\ng\hello.qbs --settings-dir C:\Users\denis.DESKTOP-RN6J6RU\AppData\Roaming\QtProject\qtcreator --command-echo-mode command-line --jobs 12 config:Debug qbs.defaultBuildVariant:debug profile:qtc_Desktop__700541af
      

      As you can see, there are 'config:Debug' instead of 'config:foo'.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            kuzulis Denis Shienkov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes