Re: [CMake] determine 32 vs 64 bit linux

2011-06-23 Thread aaron . meadows
: [CMake] determine 32 vs 64 bit linux Am Mittwoch, 22. Juni 2011, 17:33:01 schrieb Karl Merkley: > I need to install a library into a directory whose name depends on the > machine type. For example > > if (WIN32) > if (CMAKE_CL_64) > set(ARCH_DIR "win32") >

Re: [CMake] determine 32 vs 64 bit linux

2011-06-23 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/23/2011 03:31 AM, Jean-Christophe Fillion-Robin wrote: > Hi Karl, > > You could do so something like that: > > set(bitness 32) > if(CMAKE_SIZEOF_VOID_P EQUAL 8) > set(bitness 64) > endif() > > The following macro provides a more complete examp

Re: [CMake] determine 32 vs 64 bit linux

2011-06-22 Thread Rolf Eike Beer
Am Mittwoch, 22. Juni 2011, 17:33:01 schrieb Karl Merkley: > I need to install a library into a directory whose name depends on the > machine type. For example > > if (WIN32) > if (CMAKE_CL_64) > set(ARCH_DIR "win32") > else() > set(ARCH_DIR "win64") > endif() I'm not sure if

Re: [CMake] determine 32 vs 64 bit linux

2011-06-22 Thread Jean-Christophe Fillion-Robin
Hi Karl, You could do so something like that: set(bitness 32) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(bitness 64) endif() The following macro provides a more complete example... http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/CMake/SlicerMacroGetPlatformArchitectureBitness.cmake?view=markup # #

Re: [CMake] determine 32 vs 64 bit linux

2011-06-22 Thread Campbell Barton
On Wed, Jun 22, 2011 at 11:33 PM, Karl Merkley wrote: > > I need to install a library into a directory whose name depends on the > machine type.   For example > > if (WIN32) >  if (CMAKE_CL_64) >      set(ARCH_DIR "win32") >  else() >      set(ARCH_DIR "win64") >  endif() > > elseif (UNIX) >  if

[CMake] determine 32 vs 64 bit linux

2011-06-22 Thread Karl Merkley
I need to install a library into a directory whose name depends on the machine type. For example if (WIN32) if (CMAKE_CL_64) set(ARCH_DIR "win32") else() set(ARCH_DIR "win64") endif() elseif (UNIX) if () set(ARCH_DIR "linux32") else() set(ARCH_DIR "linux64