[CMake] How to specify -fpic ?
David Aldrich
David.Aldrich at EU.NEC.COM
Thu Sep 30 06:44:30 EDT 2010
Hi
> I tried adding:
>
> SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic")
>
> But that made no difference to the link command. Am I doing the right thing?
Fixed this by doing:
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
...
SET_TARGET_PROPERTIES(zodiac PROPERTIES ENABLE_EXPORTS ON)
I now have:
/usr/bin/c++ -O3 -DNDEBUG -Wall -m64 -Wl,--export-dynamic -o myProj Kernel/libKernel.a -ldl -lpython2.4
But I still have the shared library load error.
So now I need to try implementing -whole-archive/--no-whole-archive to see if that makes a difference.
Any hints how to do this please?
David
More information about the CMake
mailing list