: [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")
>
-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
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
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
#
#
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
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