[CMake] Building for 64 bit with Visual Studio 2013

Nils Gladitz nilsgladitz at gmail.com
Wed Feb 4 14:33:53 EST 2015


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/faa1abdc/attachment.html>


More information about the CMake mailing list