Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. CurrentBuild:Type

CurrentBuild:Type

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 702 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.
  • canellasC Offline
    canellasC Offline
    canellas
    wrote on last edited by
    #1

    Hi!

    I have a common.pri configuration file that, among other things, defines the output directories.

    I would like to generate a different path for debug and release products, say .../products/debug/bin and ...products/release/bin.

    I found the CurrentBuild:Type variable, but when I can not use to use in my common.pri. I tried a simple message("CurrentBuild:Type = "%{CurrentBuild:Type}), but I got Project MESSAGE: CurrentBuild:Type = %{CurrentBuild:Type}

    So, how can I use %{CurrentBuild:Type} in my common.pri file? Or, is there another way to know the "name"/string/identifier of the mode (debug or release) it is being used?

    Thanks!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      That's the usual way to detect mode:

      CONFIG(debug, debug|release) {
          message("This is debug mode or debug_and_release")
      } else {
          message("This is release mode or debug_and_release")
      }
      

      (Z(:^

      canellasC 1 Reply Last reply
      3
      • sierdzioS sierdzio

        That's the usual way to detect mode:

        CONFIG(debug, debug|release) {
            message("This is debug mode or debug_and_release")
        } else {
            message("This is release mode or debug_and_release")
        }
        
        canellasC Offline
        canellasC Offline
        canellas
        wrote on last edited by
        #3

        @sierdzio

        Thanks!

        1 Reply Last reply
        1

        • Login

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