[CMake] problems with creating static library on aix
VerweijA at tass-safe.com
Tue Jul 6 12:55:22 EDT 2010
We're experiencing two problems with creating static libraries through cmake on our AIX system.
The first one is that a cmake based build environment will come up with 64-bit XCOFF, but ar and friends won't play ball unless you add -X64. I suppose this issue has just been overlooked and is in fact minor.
The other problem is that even though I have added the below workaround referenced in a thread from July '08, "ar cr" will choke on the amount or objects I'm feeding it. I'm sure this is a problem with the ar itself and not cmake, but I would be interested to learn of a possible workaround. It works fine for smaller archives.
SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -X64 cr <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> -X64 r <TARGET> <LINK_FLAGS> <OBJECTS>")
SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -X64 <TARGET>")
More information about the CMake