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

When building a Qbs project in Qt Creator - the compiler is not properly detected.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 1.3.3
    • Fix Version/s: None
    • Component/s: Qt Creator Integration
    • Labels:
      None
    • Environment:
      Linux Mint 17.1, clang version from llvm.org

      Description

      Consider the following snippet:

         cpp.cxxFlags: {
              print("Toolchain: " + qbs.toolchain)
              print("Compiler name: " + cpp.compilerName)
              if (cpp.compilerName.contains("g++")) {
                  print("gcc")
                  return "-std=c++14"
              }
              else if (cpp.compilerName.contains("clang++")) {
                  print("clang")
                  return "-std=c++1y"
              }
          }
      

      If I run build - even if clang toolchain (kit) is selected. The first "if" gets called and the compiler gets the value for "g++".

      To get it working. I need to put the check for "clang++" on top.

      I tried it multiple times and it does look to me like a legit problem.

        Attachments

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

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            zingam Zingam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes