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

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 1.3.3
    • Qt Creator Integration
    • None
    • 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

            kandeler Christian Kandeler
            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