Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cmake built a 32 bit project in my 64 bit windows

I'm using a cmake file(someone else wrote it) to build a project. I looked at the CMakeLists and saw he used

if( CMAKE_SIZEOF_VOID_P EQUAL 8 )

to detect if the system is 64 bit. I'm using 64 bit windows 8 and it should be built into a 64 bit project. Why do I end up having a 32 bit project? Is there any other thing I should do?

like image 461
user2390930 Avatar asked Sep 17 '13 02:09

user2390930


1 Answers

When you invoke CMake, specify Win64 in the generator option. e.g.:

cmake . -G"Visual Studio 11 Win64"
like image 142
Fraser Avatar answered Sep 21 '22 14:09

Fraser