Add missing CFLAGS -fPIC.

This entry was missing due revert of CMAKE_POSITION_INDEPENDENT_CODE
usage. Reported by @Sailsman63
pull/1255/head
Helio Chissini de Castro 2017-05-02 16:45:37 +02:00
parent b93df233e3
commit 0c4c1270ac
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,8 @@ ENDIF( UNIX )
# Grouped compiler settings # Grouped compiler settings
IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW)
# hide all not-exported symbols # hide all not-exported symbols
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x" ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -Wall -std=c++0x")
SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -fPIC)
SET(LIBSTDC++_LIBRARIES -lstdc++) SET(LIBSTDC++_LIBRARIES -lstdc++)
ELSEIF(MSVC) ELSEIF(MSVC)
# enable multi-core compilation with MSVC # enable multi-core compilation with MSVC