[CMake] cmake 3.0.0 generating VS sln file default target machine type x86 (UNCLASSIFIED)

Su, Simon M CTR USARMY ARL (US) simon.m.su.ctr at mail.mil
Mon Sep 29 09:46:01 EDT 2014


Classification: UNCLASSIFIED
Caveats: NONE

Thanks for sharing. I guess I originally wanted to ask if there is a switch
to cmake that will allow picking 64-bit by default if 64-bit version is
available. 

My understanding is that (for VS2013 Express), if you run things from a
VS2013 x64 Cross Tools Command Prompt, you will get environment setup for
doing all things 64-bit and you will get "Visual Studio 12 2013 Win64" as
default generator when you run cmake from that command prompt. And if you
run from within "Developer Command Prompt for VS2013" command prompt, you
will get all the 32-bit environment setup and get "Visual Studio 12 2013" as
default generator. 

However, for CMakeLists.txt in the openmpi-1.4.4 project, it is not picking
up "Visual Studio 12 2013 Win64" generator by default even if you run cmake
from a VS2013 x64 Cross Tools Command Prompt. Most of my other cmakefied
projects will pick "Visual Studio 12 2013 Win64" as default generator when
ran from within VS2013 x64 Cross Tools Command Prompt. 

But if I have to specifically include the switch -G "Visual Studio 12 2013
Win64" to get the 64-bit project, I am also ok with it.

Thanks
-simon


-----Original Message-----
From: Eric Wing [mailto:ewmailing at gmail.com] 
Sent: Saturday, September 27, 2014 12:57 AM
To: Su, Simon M CTR USARMY ARL (US)
Cc: Jakub Zakrzewski; cmake at cmake.org
Subject: Re: [CMake] cmake 3.0.0 generating VS sln file default target
machine type x86 (UNCLASSIFIED)

On 9/26/14, Su, Simon M CTR USARMY ARL (US) <simon.m.su.ctr at mail.mil> wrote:
> Classification: UNCLASSIFIED
> Caveats: NONE
>
> For some reason, when running cmake in VS2013 (express) x64 Cross 
> Tools Command Prompt is not picking up the Visual Studio 12 2013 Win64 
> generator by default for this project. But when I added
>
> -G "Visual Studio 12 2013 Win64"
>
> To cmake, it generated x64 project files and I am able to generate 
> 64bit library from command line with msbuild command.
>
> Thanks
> -simon
>


In my experience, CMake always generates the 32-bit version by default (and
the generator doesn't let you switch in the project). I consider this
extremely annoying. I only have 1 Visual Studio version installed so it
can't be picking up other versions.

> -G "Visual Studio 12 2013 Win64"

I always have to use that switch. Aside from picking 64-bit by default or
getting a project generator that correctly allows switching within the
project, I wish there was a way I could just request 64-bit with a command
line switch independently of the Visual Studio version. In the case where I
am working with people with different versions of Visual Studio and we share
build scripts, I have no easy way of controlling 64-bit without knowing
exactly which Visual Studio version is installed.


Thanks,
Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/

Classification: UNCLASSIFIED
Caveats: NONE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 9990 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140929/add23cf6/attachment.bin>


More information about the CMake mailing list