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

2015-02-24 Thread Michael Hufer
Hi Roman, you approach (CMAKE_XL_CreateExportList_FLAGS right after ${CMAKE_XL_CreateExportList} in XL.cmake and then add -X32/-X64 into CMAKE_XL_CreateExportList_FLAGS in your CMakeLists.txt) did not work. It generated the attached link.txt, where it did not replace

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

2015-02-23 Thread Roman Bolshakov
Hi Michael, Gotcha, thanks for explanation. Right, there should be a way to pass -X32/-X64 for CreateExportList right prior to OBJECT_DIR/objects.exp. Current definition in Modules/Compiler/XL.cmake doesn't have a spot for that: set(CMAKE_${lang}_CREATE_SHARED_LIBRARY

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

2015-02-19 Thread Michael Hufer
Hi, we have issues linking against shared libraries created in our project on AIX 7.1 with XLC 12.1 when creating 64bit applications. The created shared libraries to not export any symbols. After some digging around I figured out that this is due to a missing argument for IBM's XL

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

2015-02-19 Thread Michael Hufer
Hi, We already supply the correct CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to the compiler and link flags for 64bit. So the issue is not with the compiler or linker but the CreateExportList- tool cmake invokes to generate the list of symbols to be exported by the shared library before linking it.

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

2015-02-19 Thread Roman Bolshakov
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).