Don't overwrite linker flags in the CMakeLists.txt file.

This commit is contained in:
Username404-59 2021-03-28 23:58:25 +02:00
parent 1c758448cf
commit 627473e7da
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 4 deletions

View File

@ -22,9 +22,6 @@ set(CMAKE_CXX_FLAGS "-Wall")
if (CMAKE_POSITION_INDEPENDENT_CODE)
include(CheckPIESupported)
if (NOT MSVC)
add_link_options("-pie")
endif ()
check_pie_supported()
endif()
@ -37,7 +34,7 @@ if ((${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) OR (${CMAKE_CXX_COMPILER_ID} STREQUA
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0)
message(WARNING "A ${CMAKE_CXX_COMPILER_ID} compiler version of preferably 11 or higher should be used.")
endif()
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc")
set(CMAKE_CXX_FLAGS "-flto ${CMAKE_CXX_FLAGS} -pipe -fstack-protector-strong -fstack-clash-protection")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ftree-vectorize")
include(CheckCXXCompilerFlag)