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

Michael Jackson mike.jackson at bluequartz.net
Thu Jun 11 15:00:29 EDT 2009


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
-- Generating done
-- Build files have been written to: /Users/mjackson/Desktop/Test/Build

#---------
project (Test)
message(STATUS "CMAKE_SIZEOF_VOID_P: ${CMAKE_SIZEOF_VOID_P}")


So you are saying that I need to write my own Try_Compile and test for  
the size? Which is fine by me I just want to be clear on the  
recommendation.

_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
             www.bluequartz.net

On Jun 11, 2009, at 2:46 PM, Bill Hoffman wrote:

> Michael Jackson wrote:
>> And what if you are on a system like OS X where the default build  
>> is 32 bit but you can have a 64 bit binary built? Then  
>> CMAKE_SIZEOF_VOID_P is going to be invalid.
> No, it is done with a try compile based on the current compiler  
> settings.
>
> -Bill
>



More information about the CMake mailing list