On Tuesday 30 of August 2011 08:40:08 Michael Wild wrote: > On Tue 30 Aug 2011 07:54:45 AM CEST, Dongsheng Song wrote: > > Hi, > > > > In CMakeLists.txt, I want to know whether cmake has built-in mechanism that > > I can know the target is 32-bit, or 64bit ? > > > > Thanks, > > Dongsheng > > Look at the CMAKE_SIZEOF_VOID_P variable. However, normally this is > better handled in the code through #ifdef's, because on some platforms > (e.g. Mac) it is possible to compile for multiple architecture at once > with a single compiler invocation.
there's also a new x86 target with 64-bit intruction set and 32-bit pointer called "X32" -> https://sites.google.com/site/x32abi/ _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake