[CMake] [Insight-developers] 64 bit build detection

Michael Jackson mike.jackson at bluequartz.net
Thu Jun 11 15:18:34 EDT 2009


On Jun 11, 2009, at 3:09 PM, Bill Hoffman wrote:

> Michael Jackson wrote:
>> 501:[mjackson at Ferb:~]$ cd Desktop/
>> 502:[mjackson at Ferb:Desktop]$ mkdir Test
>> 503:[mjackson at Ferb:Desktop]$ cd Test; mkdir Build; cd Build
>> 509:[mjackson at Ferb:Build]$ cmake ../
>> -- The C compiler identification is GNU
>> -- The CXX compiler identification is GNU
>> -- Check for working C compiler: /usr/bin/gcc
>> -- Check for working C compiler: /usr/bin/gcc -- works
>> -- Detecting C compiler ABI info
>> -- Detecting C compiler ABI info - done
>> -- Check for working CXX compiler: /usr/bin/c++
>> -- Check for working CXX compiler: /usr/bin/c++ -- works
>> -- Detecting CXX compiler ABI info
>> -- Detecting CXX compiler ABI info - done
>> -- CMAKE_SIZEOF_VOID_P: 4  <============ THIS IS WRONG FOR X64 builds
>> -- Configuring done
>
> I don't believe  it.   That is either a bug, or you don't really  
> have a 64 bit build.   When you run make on that project does it  
> produce 32 or 64 bit binaries?
>
> -Bill

511:[mjackson at Ferb:Build]$ make
-- CMAKE_SIZEOF_VOID_P: 4
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mjackson/Desktop/Test/Build
Scanning dependencies of target test
[100%] Building CXX object CMakeFiles/test.dir/main.cpp.o
Linking CXX executable test
[100%] Built target test
512:[mjackson at Ferb:Build]$ file test
test: Mach-O executable i386

So it builds a 32 bit executable.

Are you saying (from above) that if I have a 64 bit build of CMake  
then I will get 64 bit binaries by default?

Mike


More information about the CMake mailing list