[Interest] Is there a command line call to qmake to test the bit width?
Thiago Macieira
thiago.macieira at intel.com
Wed Mar 4 23:30:57 CET 2015
On Wednesday 04 March 2015 18:39:55 Scott Aron Bloom wrote:
> No. Maybe Im not explaining myself correctly. Since this was purely a
> question on qmake, or if there was anyway to look at a Qt install an see
> what bit width it was built against.
>
> However here are all the gory details.
>
> On a single system, I have 2 versions of the SAME Qt installed, 64 bit and
> 32 bit, both installed correctly.
Good, I have that too. Actually, 6 builds of the same Qt.
> Visual Studio has two compilers, one for 64 and one for 32. That said, when
> I used to release our tool for linux 32, we had a similar issue..
>
> The developers setup build script, requires the "cl" to be pointing to the
> correct cl, ie, that you have run vsvars before you run cmake (which then
> has the dependency on qmake)
Right.
> If I am trying to build the 64 bit system, but my shell is pointing to the
> 32 bit compiler, but the 64 bit Qt system, it will most likely compile just
> fine, but it will not link correctly.
Right.
> Im trying to put the logic into my CMake system, to query the version of
> qmake to determine, if the user has selected the appropriate Visual Studio
> and Qt version.
$ qmake -o /dev/null /dev/stdin <<<'message($$QT_ARCH)'
Project MESSAGE: x86_64
$ qmake -qt5-i386 -o /dev/null /dev/stdin <<<'message($$QT_ARCH)'
Project MESSAGE: i386
$ qmake -qt5-arm -o /dev/null /dev/stdin <<<'message($$QT_ARCH)'
Project MESSAGE: arm
$ qmake -qt5-mips -o /dev/null /dev/stdin <<<'message($$QT_ARCH)'
Project MESSAGE: mips
Since you're in a less-than-capable shell and OS, you'll need to create a file
to pass to qmake instead of /dev/stdin.
Note that this does not catch different ABIs in the same OS. If there's
interest for that, we can start recording the ABI in a qmake variable for
Qt 5.5. For me, they'd be:
x86_64-little_endian-lp64
i386-little_endian-ilp32
arm-little_endian-ilp32-eabi
mips-little_endian-ilp32-o32-hardfloat
Note: on Windows, 64-bit says "x86_64-little_endian-llp64" (note the extra l).
See http://doc.qt.io/qt-5/qsysinfo.html#buildAbi
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list