Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69611

Qmake ignores /J compiler option when generating Visual Studio projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.3
    • 5.9.6
    • Build tools: qmake
    • None
    • Windows + MSVC
    • Windows

    Description

      When the /J option is added to QMAKE_CXXFLAGS, it does not end up in the resultant MSVC project file.

       

      It is in the list of recognized arguments in msvc_objectmodel.cpp, and it assigns it to a member variable (DefaultCharIsUnsigned) when it is found. This is supposed to be written out to an XML tag of the same name, but it doesn't seem to get written out. As it turns out, this is irrelevant, because that tag is no longer in use as of MSVC 14 (the current minimum for Qt 5.11). It has probably not been in use for some earlier versions as well, but I don't have a way to double-check that.

       

      This can be verified by viewing the Microsoft.Build.Commontypes.xsd found in the Visual Studio folder  [base folder]/Xml/Schemas/1033/MSBuild – search the file for "CL" to find a section titled "NATIVE CL/LINK TASKS". This contains a list of supported tags for the "ClCompile" element, and missing from that list is DefaultCharIsUnsigned – so adding a tag with that value will be ignored when the project file is read. This can be verified for VS2015 & VS2017.

       

      Instead, the /J option should be added to the 'AddtionalOptions' tag, as is done with some other options.

      Attachments

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

        Activity

          People

            ajpatterson Andrew Patterson
            ajpatterson Andrew Patterson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes