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 architecture related,
QtWS25 Last Chance

qmake architecture related,

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 486 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.
  • I Offline
    I Offline
    integer
    wrote on 11 Jul 2022, 12:08 last edited by
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on 11 Jul 2022, 12:54 last edited by mchinand 7 Nov 2022, 12:56
      #2

      When QMAKE_HOST.arch is 'x86_64', both your contains() statements should evaluate to true (the string contains 'x86_64' and contains 'x86'). Either use an else clause with your first statement or use equals() instead of contains().

      1 Reply Last reply
      2
      • I Offline
        I Offline
        integer
        wrote on 12 Jul 2022, 04:55 last edited by integer 7 Dec 2022, 04:56
        #3

        @mchinand said in qmake architecture related,:

        'x86_64

        tried both contains() and equals still entering in both ,
        equals(QMAKE_HOST.arch, x86_64) {
        message("host is 64-bit")}
        equals(QMAKE_HOST.arch, x86_32) {
        message("host is 32-bit")}

        output---
        Project MESSAGE: host is 64-bit
        Project MESSAGE: host is 32 bit
        Project MESSAGE: host is 64-bit
        Project MESSAGE: host is 32 bit

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mchinand
          wrote on 12 Jul 2022, 12:52 last edited by mchinand 7 Dec 2022, 13:14
          #4

          With this in my .pro file:

          message(QMAKE_HOST.arch variable is $${QMAKE_HOST.arch})
          equals(QMAKE_HOST.arch,x86_64){
          message("Host is 64-bit")
          } else {
          message("Host is not 64-bit")
          }
          equals(QMAKE_HOST.arch,x86){
          message("Host is 32-bit")
          } else {
          message("Host is not 32-bit")
          }
          

          My output is:

          Project MESSAGE: QMAKE_HOST.arch variable is x86_64
          Project MESSAGE: Host is 64-bit
          Project MESSAGE: Host is not 32-bit
          

          Also, copy and paste what's in your .pro file and your output, do not type it. Your purported .pro file has message("host is 32-bit") but your purported output is 'host is 32 bit' (no dash). So, either you manually typed wrong, or you are looking at old output that was not generated from what's currently in your .pro file.

          1 Reply Last reply
          2

          2/4

          11 Jul 2022, 12:54

          • Login

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