CMakeLists.txt: Put -pie as a linker flag were it belongs

Fixes warning introduced by PR #6040
This commit is contained in:
Olivier Goffart 2017-10-06 14:34:22 +02:00
parent cd07865da6
commit b8f7c6daae
2 changed files with 6 additions and 4 deletions

View file

@ -20,8 +20,9 @@ include_directories(${CMAKE_SOURCE_DIR}/src/csync
include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/qtokenizer)
if(UNIX AND NOT APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pie -fPIE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()
if(NOT BUILD_LIBRARIES_ONLY)

View file

@ -243,8 +243,9 @@ if (NOT NO_SHIBBOLETH)
endif()
if(UNIX AND NOT APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pie -fPIE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)