On Tue, Sep 1, 2009 at 10:56 AM, Mathieu Malaterre<mathieu.malate...@gmail.com> wrote: > On Thu, Aug 20, 2009 at 4:00 PM, Brad King<brad.k...@kitware.com> wrote: >> 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. > > I am trying here also and I cannot get it to work. I do not understand > where the -fPIC is coming from. > > ... >> cat Modules/Platform/Linux-XL-CXX.cmake > message("coucou CXX") > SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") > SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") > ...
This works: > cat Modules/Platform/Linux-XL-CXX.cmake SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") Except I am getting the same linker error: > gmake [ 4%] Built target cmsys Linking C shared module libcmsysTestDynload.so /usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib/crt1.o:(.rodata+0x4): undefined reference to `main' gmake[2]: *** [Source/kwsys/libcmsysTestDynload.so] Error 1 gmake[1]: *** [Source/kwsys/CMakeFiles/cmsysTestDynload.dir/all] Error 2 gmake: *** [all] Error 2 -- Mathieu _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake