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. how to build on cmd line specifying "build configuration" ?
Forum Updated to NodeBB v4.3 + New Features

how to build on cmd line specifying "build configuration" ?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 235 Views 1 Watching
  • 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
    davecotter
    wrote on last edited by davecotter
    #1

    I have these custom-named "Build Configuations" specified in the GUI:

    Screen Shot 2021-05-21 at 9.09.07 AM.png
    How do i choose which one is built when i invoke the compiler from the command line?

    (please don't ask why it's set up this way, and don't say "you're doing it wrong". what i'd like to know is: can i choose which one to compile from the command line. a valid answer is "sorry that's not possible")

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      The command is written out in the Makefile if you mean the command line to create the Makefile. Find where Makefile is located and open it to see the command. I believe you know how to run make

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

        @JoeCFD When i use the GUI, and say i select from the "configuration" menu kJams 2 Debug, then, when i go to the "Build" menu and choose Build Project "kJams_mac", i see this in the output:

        Project MESSAGE: ------------------------------
        Project MESSAGE: build_type: debug
        Project MESSAGE: kJams 2 Debug 64bit
        

        When i go to the command line and type this:

        qmake kjams_mac.pro
        

        I get this:

        Project MESSAGE: ------------------------------
        Project MESSAGE: build_type: release
        Project MESSAGE: kjams_mac 64bit
        

        which is precisely what i do not want. i'm asking of there's some command to do something like this:

        qmake kjams_mac.pro -BUILD_CONFIGURATION="kJams 2 Debug"
        

        ??

        1 Reply Last reply
        0
        • D Offline
          D Offline
          davecotter
          wrote on last edited by davecotter
          #4

          oooOOOOOooooh!!!! I see. I create the makefile in the GUI the normal way, then observe the command used to create it after it's been created. Good call, thanks for the answer!

          BTW: the command line looks like this:

          qmake -o Makefile ../kJams_mac.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=force_debug_info CONFIG+=separate_debug_info 'TARGET="kJams 2 Debug"' DEFINES+=kDEBUG DEFINES+=KJAMS_PRO DEFINES+=KJAMS_2
          

          The reason it starts with "../" is i put it in a subdir of the .pro file so they don't all get tangled together.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #5
            This post is deleted!
            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