[CMake] How to specify -fpic ?
David Aldrich
David.Aldrich at EU.NEC.COM
Thu Sep 30 06:19:22 EDT 2010
Hi Michael
> For one, you are missing -ldl. Add ${CMAKE_DL_LIBS} to your
> target_link_libraries call.
Thanks for pointing that out. It's in there now:
/usr/bin/c++ -O3 -DNDEBUG -Wall -m64 -o myProj -rdynamic Kernel/libKernel.a -ldl -lpython2.4
> --export-dynamic may be also necessary, if your dlopen'ed
> libraries use symbols in your executable.
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?
David
More information about the CMake
mailing list