[CMake] Building for 64 bit with Visual Studio 2013

Scott Aron Bloom scott.bloom at onshorecs.com
Wed Feb 4 14:44:02 EST 2015


That was it!  Is there any way to set that as the default?  Ie, is there an environmental variable that sets the default generator?

Scott

From: Nils Gladitz [mailto:nilsgladitz at gmail.com]
Sent: Wednesday, February 04, 2015 11:34 AM
To: Scott Aron Bloom; cmake at cmake.org
Subject: Re: [CMake] Building for 64 bit with Visual Studio 2013

On 04.02.2015 20:28, Scott Aron Bloom wrote:
We have been building for 32 bits on windows, and 64 bit on linux and OSX for a while.

In order to enable this, we have a simple function that uses CMAKE_SIZEOF_VOID_P to add a define via add_defintions

However, we are now going to build for windows 64, I calling vsvarsall.bat with x64 as a parameter, however, the CMAKE_SIZEOF_VOID_P still is equal to 4.

Any idea on what Im missing?

Are you using a "Visual Studio" generator or a "Makefile" or "Ninja" generator?
The visual studio command line environment is only relevant for the later.

For the Visual Studio generators you can append e.g. "Win64" to the generator name to get the 64-bit compilers.
e.g. "Visual Studio 12 2013 Win64".

Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150204/89c3e7d6/attachment.html>


More information about the CMake mailing list