[CMake] properly declare FPIC
use CMAKE_POSITION_INDEPENDENT_CODE instead of manually addinf -fPIC to CXX args. modified: CMakeLists.txt
This commit is contained in:
parent
f1c570752b
commit
1bdc95a498
|
@ -53,7 +53,7 @@ include_directories (BEFORE SYSTEM ./ext/gtest/include)
|
|||
|
||||
if (UNIX)
|
||||
if (NOT APPLE)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
||||
endif()
|
||||
|
||||
# For config.h, detect the libraries, functions, etc.
|
||||
|
|
Loading…
Reference in New Issue