[Insight-developers] 64 bit build detection

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jun 11 16:19:20 EDT 2009


Le 11 juin 09 à 20:06, Bill Hoffman a écrit :

> kent williams wrote:
>> Interesting question. Looking at what we do (and that's based on  
>> what Slicer
>> does) the difference between 64 and 32 bit comes about in how we  
>> set the
>> CFLAGS and CXXFLAGS before we run CMake -- we don't tell CMake  
>> anything
>> about whether it's 32 or 64 bit.
>> I don't remember seeing anything about CMake telling you whether  
>> you're 32
>> or 64bit. As a last ditch effort you could try to run a program  
>> that uses
>> the current CFLAGS and returns the size of a pointer e.g.
>> int main() { exit(sizeof(void *) == 4 ? 32 : 64 ); }
>
> CMake always does a try compile and sets CMAKE_SIZEOF_VOID_P in any  
> CMake based project.  If that is 8 you are 64 bit.


Thanks!

Gaëtan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090611/cb276a6b/attachment.pgp>


More information about the Insight-developers mailing list