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

Windows: CONFIG(debug, debug|release) check reports true for -release builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.14.1
    • Build System
    • None
    • Windows

    Description

      https://doc.qt.io/qt-5/qmake-test-function-reference.html#built-in-test-functions states that

      CONFIG(debug, debug|release):message(Debug build!): 
      

      can be used to detect a debug build.

      However, the condition also triggers for release builds were CONFIG is

       lex yacc debug exceptions depend_includepath testcase_targets
       import_plugins import_qpa_plugin windows file_copies qmake_use qt
       warn_on release link_prl flat debug_and_release
       debug_and_release_target precompile_header autogen_precompile_source
       embed_manifest_dll embed_manifest_exe shared shared release
       incredibuild_xge no_plugin_manifest win32 msvc copy_dir_files debug
       DebugBuild Debug build_pass c++11
      

      (debug is again found after release) as opposed to Linux:

       lex yacc debug exceptions depend_includepath testcase_targets import_plugins import_qpa_plugin
       file_copies qmake_use qt warn_on release link_prl incremental shared shared 
      release linux unix posix gcc
      

      This causes Qt Creator builds to report

      Project MESSAGE: Mismatching build config (Debug vs Release) setting QTC_CLANG_BUILDMODE_MISMATCH
      

      for Windows release builds ( see https://codereview.qt-project.org/c/qt-creator/qt-creator/+/266418 ).

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            kleint Friedemann Kleint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes