[CMake] How to specify -fpic ?
David Aldrich
David.Aldrich at EU.NEC.COM
Wed Sep 29 12:25:11 EDT 2010
Hi
My C++ code consists of an executable and several shared libraries.
With my CMake build files, I find that the executable fails to load the shared libraries ( the dlopen() call results in error 'undefined symbol...' ).
The software works fine under our production build system that uses manually coded makefiles.
I notice that the production system linker command invokes -fpic, while CMake uses -fPIC. I am wondering if that is the reason.
I set the compile flags with:
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -Wall -m64" )
How can I replace -fPIC with -fpic in CMake please?
Best regards
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100929/92acab39/attachment.htm>
More information about the CMake
mailing list