[CMake] cmake on the BGP

Brad King brad.king at kitware.com
Thu Aug 20 10:00:45 EDT 2009


John R. Cary wrote:
> env CC=xlc_r CXX=xlC_r
[snip]
> -- The C compiler identification is GNU

Be sure to create a fresh build tree when changing compilers.
CMake cached the 'cc' (gnu) compiler it found the first time
and did not pay attention to the environment later.

> /gpfs/software/linux-sles10-ppc64/apps/ibmcmp-sep2008/opt/vacpp/bg/9.0/bin/xlC:
>  1501-216 (W) command option -dynamic is not recognized - passed to ld
>  /usr/bin/ld: unrecognized option '-dynamic'

It looks like support for the C compiler was added but not
C++, and also that this combination is not well tested.  I
can help you finish adding support.  Look in Modules/Platform
at the files

  Linux.cmake
  Linux-XL-C.cmake

The first contains default flags for Linux, which are for GCC.
The second contains compiler-specific flags for the XL C compiler
on Linux.  Copy it to the file

  Linux-XL-CXX.cmake

and change the ..._C_FLAGS variable names to ..._CXX_FLAGS.
Also, please read through Linux.cmake and check for the options
in the XL compiler documentation to see if other flags need to
be changed.


BTW, a platform/compiler combination is officially supported
only if someone is contributing nightly testing to the dashboard:

  http://www.cdash.org/CDash/index.php?project=CMake

After we get this working, do you have about an hour of
spare computing time on a machine at night?  If you can
submit testing results then we can support this platform
permanently.


Thanks,
-Brad


More information about the CMake mailing list