Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1763

Some cpp properties cannot be exported

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 2.2.0
    • 2.1.0, 2.2.0, 2.1.1, 2.1.2
    • None
    • All
    • 53ce9d53d (2.2)

    Description

      Exporting certain cpp properties results in a non resolvable Qbs project.

      This worked in Qbs 1.9.x and Qbs 2.0.x

      The following code is the minimal example I could come up with:

      Project {
          Product {
              name: "cpp20"
              Export {
                  Depends { name: "cpp" }
                  cpp.cxxLanguageVersion: "c++20" // this property works fine
                  // note: any of the following propties trigger failed qbs parse
                  cpp.minimumMacosVersion:"10.15" // broken in Qbs 2.1.x for non MacOS
                  cpp.minimumWindowsVersion:"10.0" // broken in Qbs 2.1.x for non Windows
                  Properties {
                      condition: qbs.toolchain.contains('clang') && !qbs.targetOS.contains("darwin")
                      cpp.linkerVariant:"lld" // broken in Qbs 2.1.x for Linux with Clang compiler
                  }
              }
          }
          Product {
              name: "HeaderOnly"
              Export {
                  Depends { name: "cpp20" }
              }
          }
          StaticLibrary {
              // note: this lib is disabled if broken properties are used
              name: "BrokenLib"
              // note: all three depends are needed to trigger the error
              Depends { name: "cpp20" }
              Depends { name: "HeaderOnly" }
              Depends { name: "Qt.core" }
          }
          Application {
              // note: this app triggers an assert
              Depends { name: "cpp20" }
              Depends { name: "BrokenLib" }
          }
      }
      

      I have tested it on Linux, MacOS and Windows.

      Edit: I just want to add that the same behaviour occurs when I use a Module `cpp20` instead of a Product. But products is easier to reproduce in one qbs file.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            arbmind Andreas Reischuck
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes