[CMake] Bug on AIXC in CMake 2.6.1, was "RE: Problem with add_definitions on CMake 2.6.0 RC 6 and RC 8 on AIX"

Dieter Rosch dieter at bbd.co.za
Wed Sep 10 15:31:58 EDT 2008


Hi,

I've finally had time to play with this a bit.

It turns out that in cmake-2.6.1/Modules/Platform/AIX.cmake, the following
line is missing

  SET(CMAKE_C_COMPILE_OBJECT
    "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")


So the section:
IF(NOT CMAKE_COMPILER_IS_GNUCC)
  SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES>
<FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
  SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS>
-S <SOURCE> -o <ASSEMBLY_SOURCE>")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)

Should read:

IF(NOT CMAKE_COMPILER_IS_GNUCC)
  SET(CMAKE_C_COMPILE_OBJECT
    "<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
  SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES>
<FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
  SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <FLAGS>
-S <SOURCE> -o <ASSEMBLY_SOURCE>")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)

Perhaps someone can add this into the next build for CMake?

Regards,
Dieter




> -----Original Message-----
> From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On
> Behalf Of Alexander Neundorf
> Sent: 17 April 2008 23:45 PM
> To: cmake at cmake.org
> Subject: Re: [CMake] Problem with add_definitions on CMake 2.6.0 RC 6
> and RC 8 on AIX
> 
> On Thursday 17 April 2008, Dieter Rosch wrote:
> > Hi,
> >
> >
> >
> > I have a project that compiles perfectly on AIX with CMake 2.4.8.
> >
> > However, I create a new build directory and use CMake 2.6.0 RC 6 or 8
> to
> > build and it fails. The problem seems to be that the 2 newer version
> are
> > ignoring my ADD_DEFINITIONS statements.
> >
> > Has anyone else experienced this?
> 
> It should work. Please send the cmake code for that.
> 
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list