qmake architecture related,
Solved
General and Desktop
-
@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 -
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.