[CMake] properly declare FPIC (#417)

[CMake] properly declare FPIC
This commit is contained in:
Adrian Lucrèce Céleste 2019-08-23 15:48:20 -04:00 committed by GitHub
commit 28466eea10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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.