Joachim Ziegler wrote:
Joachim Ziegler wrote:
I suppose the problem is in the link line, which says:

/usr/bin/X11/c++      -fPIC -static
"CMakeFiles/startCompletionServer.dir/StartCompletionServer.o"   -o
startCompletionServer -rdynamic -L/KM/home-0/ziegler/tmp/build
-Wl,-Bstatic -lbaselib -Wl,-Bdynamic -lpthread -lz
-Wl,-rpath,/KM/home-0/ziegler/tmp/build

Yes it is. If I replace the above "-Wl,-Bdynamic -lpthread -lz"  by an
explicit

-Wl,-Bstatic -lpthread -lz
[snip]
So what can I do to tell CMake to link everything statically?

It looks like you're using CMake 2.4. In CMake 2.6 your example builds correctly for me.

-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to