Don't overwrite linker flags in the CMakeLists.txt file.
This commit is contained in:
parent
1c758448cf
commit
627473e7da
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue