[cmake-developers] Determining version and arch for Visual Studio generators.

Stephen Kelly steveire at gmail.com
Wed Apr 10 16:45:32 EDT 2013


Stephen Kelly wrote:

> Bill Hoffman wrote:
> 
>> Seems a bit unstable to hard code the version.  I wonder if you can
>> detect the one that is being used somehow?
> 
> I don't think it's unstable, but I do think the version and arch should be
> detected somehow.
> 
> 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.

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?

This isn't for 2.8.11 obviously. 

Thanks,

Steve.





More information about the cmake-developers mailing list