Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMake -- how to test for build type (release, debug)
Forum Update on Monday, May 27th 2025

QMake -- how to test for build type (release, debug)

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 218 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dwilliams
    wrote on last edited by
    #1

    I was looking for a QMake variable that has the build type (release, debug), but I couldn't find it. So, I tried the "contains" test:

    contains(OUT_PWD, *debug*)
    

    which always returns false. And I have tried a lot of variants.

    Where should I look to get that info?

    jsulmJ artwawA 2 Replies Last reply
    0
    • D dwilliams

      I was looking for a QMake variable that has the build type (release, debug), but I couldn't find it. So, I tried the "contains" test:

      contains(OUT_PWD, *debug*)
      

      which always returns false. And I have tried a lot of variants.

      Where should I look to get that info?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @dwilliams https://doc.qt.io/qt-5/qmake-test-function-reference.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • D dwilliams

        I was looking for a QMake variable that has the build type (release, debug), but I couldn't find it. So, I tried the "contains" test:

        contains(OUT_PWD, *debug*)
        

        which always returns false. And I have tried a lot of variants.

        Where should I look to get that info?

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #3

        @dwilliams also https://doc.qt.io/qt-5/qmake-variable-reference.html#config

        For more information please re-read.

        Kind Regards,
        Artur

        1 Reply Last reply
        3
        • D Offline
          D Offline
          dwilliams
          wrote on last edited by
          #4

          Thank you. I was just going to reply that I found CONFIG on the qmake tests page, but y'all beat me to it. :)

          Thank you for the quick replies!

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved