[CMake] determine 32 vs 64 bit linux
Karl Merkley
karl at elemtech.com
Wed Jun 22 19:33:01 EDT 2011
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")
endif()
Is there a better way to do this? The win64 version seems to work correctly. What variable do I check for 32 vs 64 bit linux?
Thanks,
Karl
More information about the CMake
mailing list