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

Test functions in TEMPLATE=subdirs .pro files seem to be ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: Qt Creator 4.5.2
    • Fix Version/s: None
    • Labels:
    • Environment:
      {code:java}
      $ uname -s -r -m -p -i -o
      Linux 4.15.0-20-generic x86_64 x86_64 x86_64 GNU/Linux{code}
      Qt Creator 4.5.2

      Based on Qt 5.9.5 (GCC 7.3.0, 64 bit)

      Description

      I've got a subdirs .pro file in which a couple subprojects are added depending on QT's major version, using the greaterThan() test function.

      Qmake digests this file properly, however Qt Creator seems to completely ignore the existence of the greaterThan() related block and adds the subprojects to the main project regardless.

      The below images show the issue. 

      In this one, we see that even though QT_MAJOR_VERSION is 4 (as proved by the emitted message), the subproject guarded by the greaterThan() test function is added to the main project even though it should not. This shows in the list of subprojects in the left panel and in the message emitted by the subproject.

       

      In the next one, we see that changing the name of the SUBDIRS variable to SUBDIRS*X*, makes the problem disappear, proving that Qt Creator is actually evaluating that line even though it should not.

       

        Attachments

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

          Activity

            People

            • Assignee:
              hunger Tobias Hunger
              Reporter:
              fabioa Fabio Alemagna
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes