Brad King wrote:
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.
Got it. Now 'rm -rf' on the build tree.
/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.
So do I understand correctly that one uses
Linux-XL-CXX.cmake
to override settings in Linux.cmake?
Here is what I have now:
login3.surveyor$ ls ../Modules/Platform/Linux-XL-C*.cmake
../Modules/Platform/Linux-XL-C.cmake ../Modules/Platform/Linux-XL-CXX.cmake
login3.surveyor$ cat ../Modules/Platform/Linux-XL-C*.cmake
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-DPIC")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-DPIC")
The bootstrap "make" dies now at
[ 5%] Building C object
Source/kwsys/CMakeFiles/cmsysTestDynload.dir/testDynload.o
Linking C shared module libcmsysTestDynload.so
/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib/crt1.o:(.rodata+0x4):
undefined reference to `main'
make[2]: *** [Source/kwsys/libcmsysTestDynload.so] Error 1
make[1]: *** [Source/kwsys/CMakeFiles/cmsysTestDynload.dir/all] Error 2
make: *** [all] Error 2
Can I turn off shared lib usage altogether? (Problematic on BGP).
I did not see
Suppose I get a CMake that has the above in its
share dir, and I want to use my own Linux-XL-CXX.cmake.
Can I simply put my file in my project's top CMake dir? Do I have
to include it somehow?
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 think I will not be able to get permission to run nightly tests at
this supercomputer center. My guess, however, is that VisualAge
and XL are basically the same, and I could get VisualAge on my
Linux box.
John Cary
--
Tech-X Corp., 5621 Arapahoe Ave, Suite A, Boulder CO 80303
c...@txcorp.com, p 303-448-0727, f 303-448-7756, NEW CELL 303-881-8572
_______________________________________________
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