[CMake] Where to change default link line on Cmake
Rene Salmon
salmr0 at bp.com
Mon May 3 00:00:59 EDT 2010
Hi,
I tried searching the list archives but did not find and answer to my
problem. I am fairly new to Cmake so maybe I just don't know exactly what to
look for.
I installed Cmake on an IBM power machine that only had the gcc compilers. I
am guessing that is where and how cmake is determining what a good link line
would be. Now I am trying to use cmake to build on a machine that has the
xlc and xlf compilers. When I try to bild I get this:
xlc_r -O3 -qhot CMakeFiles/fd3ptr.dir/fd3ptr.c.o -o fd3ptr -rdynamic
xlc_r: 1501-216 (W) command option -dynamic is not recognized - passed to ld
/usr/bin/ld: unrecognized option '-dynamic'
/usr/bin/ld: use the --help option for usage information
Basically cmake is throwing in the "-rdynamic" flag to xlc to link in my
binaries. That would probably work if I where using gcc but xlc does not
like that flag. The question is where does cmake set this flag? What is
the recommended way to change this flag or clear it?
I tried:
set (CMAKE_C_LINK_EXECUTABLE "-W,-Bdynamic")
but that more or less just cleared everything else which is really not what
I want I simply want to replace "-rdynamic" with "-W,-Bdynamic"
Thanks
Rene
More information about the CMake
mailing list