[CMake] Change archive creation flags

Brad King brad.king at kitware.com
Tue Nov 10 13:44:51 EST 2009


Will Dicharry wrote:
> Hi All,
> 
> This was asked a while ago at
> http://www.cmake.org/pipermail/cmake/2009-January/026318.html, but it
> doesn't look like there was a response to that question.
> 
> I have the same problem:
> 
> on 64 bit AIX, ar must be invoked with a "-X 64" flag.  Is there a way
> to tell CMake to do this?

Please file a feature request to support -q64 on AIX:

  http://www.cmake.org/Bug

and send me the issue number.

Here are two work-arounds:

- Set the OBJECT_MODE env var

- Add this code (but only for the one platform) to CMakeLists.txt:

  foreach(step CREATE APPEND FINISH)
    string(REPLACE "<CMAKE_AR>" "<CMAKE_AR> -X 64"
      CMAKE_C_ARCHIVE_${step} "${CMAKE_C_ARCHIVE_${step}}")
  endforeach()

-Brad



More information about the CMake mailing list