Hi,
I've got next error while trying to link static library to shared one on
Linux:
/usr/bin/ld: ...: relocation R_X86_64_32 against `.rodata' can not
be used when making a shared object; recompile with -fPIC
This error can be detected on CMake configure step instead of linker
stage if I add next code:
set_property(TARGET ... PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE YES)
in this case error message is:
CMake Error: Property POSITION_INDEPENDENT_CODE on target "..." does
not match the INTERFACE_POSITION_INDEPENDENT_CODE property requirement
of dependency "...".
because there is POSITION_INDEPENDENT_CODE=YES default value for shared
library. So I wonder why there is no default value
INTERFACE_POSITION_INDEPENDENT_CODE=NO for static one?
Thanks, Ruslo
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake