Merge pull request #672 from sergiud/cmake-allow-to-override-fpic

cmake: allow to override `-fPIC`
This commit is contained in:
Sergiu Deitsch 2021-06-16 00:32:16 +02:00 committed by GitHub
commit 44331dc245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,9 @@ endif (NOT WITH_THREADS)
set (CMAKE_C_VISIBILITY_PRESET hidden) set (CMAKE_C_VISIBILITY_PRESET hidden)
set (CMAKE_CXX_VISIBILITY_PRESET hidden) set (CMAKE_CXX_VISIBILITY_PRESET hidden)
set (CMAKE_VISIBILITY_INLINES_HIDDEN 1) set (CMAKE_POSITION_INDEPENDENT_CODE ON)
set (CMAKE_VISIBILITY_INLINES_HIDDEN ON)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include (CheckCXXCompilerFlag) include (CheckCXXCompilerFlag)
@ -585,8 +587,6 @@ add_library (glog
add_library (glog::glog ALIAS glog) add_library (glog::glog ALIAS glog)
set_target_properties (glog PROPERTIES POSITION_INDEPENDENT_CODE ON)
if (Unwind_FOUND) if (Unwind_FOUND)
target_link_libraries (glog PUBLIC unwind::unwind) target_link_libraries (glog PUBLIC unwind::unwind)
set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})") set (Unwind_DEPENDENCY "find_dependency (Unwind ${Unwind_VERSION})")