[cmake-developers] Determining version and arch for Visual Studio generators.
Bill Hoffman
bill.hoffman at kitware.com
Wed Apr 10 17:37:44 EDT 2013
On 4/10/2013 4:45 PM, Stephen Kelly wrote:
>> >I don't think it's unstable, but I do think the version and arch should be
>> >detected somehow.
>> >
I take it back.
It is not hard coded. It is just matching qt win32-msvc2010,
win32-msvc2012 with the correct CMake generator:
win32-g++*:CMAKE_GENERATOR = -G \"MinGW Makefiles\"
41 win32:equals(QT_ARCH, x86_64) {
42 win32-msvc2010:CMAKE_GENERATOR = -G \"Visual Studio
10 Win64\"
43 win32-msvc2012:CMAKE_GENERATOR = -G \"Visual Studio
11 Win64\"
44 }
41 45
What about VS 9, seems to be missing?
What are all the possible values of win32-??
>> >Would it be possible for cmake to run devenv to check the version and arch
>> >before setting the default generator? That would have anticipated and pre-
>> >solved the bug here.
> I suppose the arch problem occurred because Qt was built in 64bit mode, and
> that has nothing to do with devenv.
>
Yes, that is correct, you have to figure out if Qt is 64 first, and then
configure CMake.
> I can put a variable in the Qt5Core config file containing the arch. Better
> yet, I can put it in a INTERFACE_TARGET_ARCH target property and have cmake
> ensure that all targets are compatible.
>
> Such a TARGET_ARCH should be a built-in property in CMake, and CMake should
> also check it for each target against the generator. That would at least
> give a sensible error message about what the problem is at cmake-time.
>
> This might also be generally useful for storing an arch triple on linux
> systems? Can 32 and 64 bit libs be mixed there?
>
I don't think they can be mixed anywhere.
> This isn't for 2.8.11 obviously.
Sure.
-Bill
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
More information about the cmake-developers
mailing list