AFAIK, there is also a global CMAKE_POSITION_INDEPENDENT_CODE that is used to derive the target-specific value of POSITION_INDEPENDENT_CODE. If you wanna use fPIC for all your targets, you may wanna consider set(CMAKE_POSITION_INDEPENDENT_CODE ON). Best, P