mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Fix compilation on GCC 4.6
The compiler flag `-fcf-protection` is only available since GCC 8.1. Closes #892
This commit is contained in:
parent
c1d37c189e
commit
315d5ae498
@ -256,7 +256,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
|||||||
# -fcf-protection is supported only on x86 GNU/Linux per this gcc doc:
|
# -fcf-protection is supported only on x86 GNU/Linux per this gcc doc:
|
||||||
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fcf-protection
|
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fcf-protection
|
||||||
if ((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)"))
|
if ((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)"))
|
||||||
add_compiler_flags(4.6 "-fcf-protection")
|
add_compiler_flags(8.1 "-fcf-protection")
|
||||||
endif ()
|
endif ()
|
||||||
add_compiler_flags(4.6 "-pipe")
|
add_compiler_flags(4.6 "-pipe")
|
||||||
add_compiler_flags(4.6 "-Werror=format-security")
|
add_compiler_flags(4.6 "-Werror=format-security")
|
||||||
|
Loading…
Reference in New Issue
Block a user