[CMake] cmake shared library exported symbols on 64bit AIX XLC compiler

Roman Bolshakov roolebo at gmail.com
Thu Feb 19 21:34:12 EST 2015


If your project is supposed to be built 64-bit only on 64-bit build host
and 32-bit only on 32-bit one, you can just append proper flag into
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS depending on the value of
CMAKE_SIZEOF_VOID_P (
http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_SIZEOF_VOID_P.html).

In the case of multi-lib OS (where you can build both 32-bit and 64-bit app
on the same 64-bit build host) you could specify something like
-DPLATFORM=32 -DPLATFORM=64 when you invoke CMake. The approach would
require you to have two separate build trees though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150220/82c3e96e/attachment.html>


More information about the CMake mailing list