[cmake-developers] Qt builds: module machine type 'x64' conflicts with target machine type 'X86'

clinton at elemtech.com clinton at elemtech.com
Wed Apr 10 09:07:01 EDT 2013



----- Original Message -----
> Eric Noulard wrote:
> >>
> >> I don't know anything about building on Windows, so that might indeed be
> >> the problem. Can you confirm that it's not a misunderstanding?
> >>
> > 
> > In http://thread.gmane.org/gmane.comp.lib.qt.devel/10746 we can read:
> > "3>------ Build started: Project: axserverapp, Configuration: Release
> > Win32 ------"
> > 
> > (or in other places:
> > 
> > Microsoft (R) Visual Studio Version 10.0.40219.1.
> > Copyright (C) Microsoft Corp. All rights reserved.
> > 1>------ Clean started: Project: ALL_BUILD, Configuration: Release Win32
> > ------ 1>Build started 4/5/2013 2:45:03 PM.
> > 
> > )
> > 
> > which means that the build target Win32 i.e. a 32 bits build.
> 
> Ah, see? I didn't even know what to look for :).
> 
> > 
> > Could you check that the concerned build targets Win64 and not win32 ?
>  
> I don't have direct access to the machines, so I can't really check anything
> except the cmake command lines, which are generated by the expect_pass macro
> and similar here:
> 
>  https://qt.gitorious.org/qt/qtbase/blobs/HEAD/src/corelib/Qt5CTestMacros.cmake
> 
> which is used here for example:
> 
>  https://qt.gitorious.org/qt/qtbase/blobs/HEAD/tests/auto/cmake/CMakeLists.txt
> 
> which is used by a cmake command generated here:
> 
>  https://qt.gitorious.org/qt/qtbase/blobs/HEAD/mkspecs/features/ctest_testcase.prf
> 
> 
> So, how is the target 32bit/64bit determined? An option to cmake at cmake
> time?

If the generator is a makefile, it is already determined by the environment.  If the generator is Visual Studio, its determined by the chosen generator.

>From looking here:
https://qt.gitorious.org/qt/qtbase/blobs/HEAD/mkspecs/features/ctest_testcase.prf

It appears it needs more logic to handle the CMAKE_GENERATOR variable.
If a visual studio generator is going to be used, then it'll probably need logic to determine which version of visual studio it is to choose the correct visual studio generator (because of project file format changes).  For example, the correct generator could be any of "Visual Studio 10" "Visual Studio 10 Win64" "Visual Studio 11" etc...
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#section_Generators

If NMake Makefiles are still used to build Qt with MSVC, then perhaps you can simply set the generator to "NMake Makefiles".

Clint



More information about the cmake-developers mailing list