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

qmake: NDEBUG macro always added, regardless of configuration

    XMLWordPrintable

Details

    • Windows
    • 474a5e2f3fe7d5fdcb930b0b6da896cd4d9c209c (qt/qtbase/5.14)

    Description

      qmake always wants to add NDEBUG to the DEFINES var. With another version (e.g. 5.12.6) this does not happen.

      This can be tested by opening a "Native Tools Command Prompt for VS" and pasting the following:

      ECHO CONFIG -= debug release debug_and_release > foo.pro&
      ECHO CONFIG += (Config) no_fixpath >> foo.pro&
      ECHO QT += core >> foo.pro&
      (Path to Qt)\bin\qmake&
      TYPE Makefile | FINDSTR /B "DEFINES" 2> NUL&
      DEL foo.pro Makefile

      E.g.:

      5.13.2 - Debug

      • Command:

        ECHO CONFIG -= debug release debug_and_release > foo.pro&
        ECHO CONFIG += debug no_fixpath >> foo.pro&
        ECHO QT += core >> foo.pro&
        \qt\5.13.2\msvc2017_64\bin\qmake&
        TYPE Makefile | FINDSTR /B "DEFINES" 2> NUL&
        DEL foo.pro Makefile

      • Output:

        DEFINES = -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -DQT_GUI_LIB -DQT_CORE_LIB

      5.13.2 - Release

      • Command:

        ECHO CONFIG -= debug release debug_and_release > foo.pro&
        ECHO CONFIG += release no_fixpath >> foo.pro&
        ECHO QT += core >> foo.pro&
        \qt\5.13.2\msvc2017_64\bin\qmake&
        TYPE Makefile | FINDSTR /B "DEFINES" 2> NUL&
        DEL foo.pro Makefile

      • Output:

        DEFINES = -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DNDEBUG -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB

      5.12.6 - Debug

      • Command:

        ECHO CONFIG -= debug release debug_and_release > foo.pro&
        ECHO CONFIG += debug no_fixpath >> foo.pro&
        ECHO QT += core >> foo.pro&
        \qt\5.12.6\msvc2017_64\bin\qmake&
        TYPE Makefile | FINDSTR /B "DEFINES" 2> NUL&
        DEL foo.pro Makefile

      • Output:

        DEFINES = -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_GUI_LIB -DQT_CORE_LIB

      5.12.6 - Release

      • Command:

        ECHO CONFIG -= debug release debug_and_release > foo.pro&
        ECHO CONFIG += release no_fixpath >> foo.pro&
        ECHO QT += core >> foo.pro&
        \qt\5.12.6\msvc2017_64\bin\qmake&
        TYPE Makefile | FINDSTR /B "DEFINES" 2> NUL&
        DEL foo.pro Makefile

      • Output:

        DEFINES = -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DNDEBUG

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-81569
          # Subject Branch Project Status CR V

          Activity

            People

              jbornema Joerg Bornemann
              mecfc Miguel Costa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes