Add a few compilation flags for gnu and clang compilers.
This commit is contained in:
parent
80510909f1
commit
5484b9cf59
|
@ -8,7 +8,7 @@ set(CMAKE_CXX_FLAGS_RELEASE "-Os")
|
|||
|
||||
if((${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) OR (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang))
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc")
|
||||
set(CMAKE_CXX_FLAGS "-flto ${CMAKE_CXX_FLAGS} -fstack-protector -fstack-clash-protection")
|
||||
set(CMAKE_CXX_FLAGS "-flto ${CMAKE_CXX_FLAGS} -fpie -pipe -fcf-protection -fstack-protector -fstack-clash-protection")
|
||||
endif()
|
||||
|
||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
|
||||
|
|
Loading…
Reference in New Issue