CMAKE 编译加入-fPIC

option(ENABLE_PIC "Generate position independent code (necessary for shared libraries)" TRUE)
set(CMAKE_POSITION_INDEPENDENT_CODE ${ENABLE_PIC})

你可能感兴趣的:(CMAKE 编译加入-fPIC)