[CMake] How to detect 32/64 architecture
Andreas Schneider
mail at cynapses.org
Fri Mar 9 06:10:55 EST 2007
Luigi Calori wrote:
> Is there a macro or variable to detect 32/64 architecture under Linux
> (possibly also under windows)
> In order to mimic pre-existent builds we have been asked to install on
> lib64 if on a 64 architecture and lib or luib32 if appropriate
>
Hi Luigi,
I check the void pointer size.
if (UNIX AND NOT WIN32)
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
ow_check_cxx_compiler_flag("-fPIC" WITH_FPIC)
if (WITH_FPIC)
add_definitions(-fPIC)
endif (WITH_FPIC)
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif (UNIX AND NOT WIN32)
> Thanks a lot
:)
-- andreas
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
--
http://www.cynapses.org/ - cybernetic synapses
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20070309/9f445dfc/signature.pgp
More information about the CMake
mailing list