File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ macro(sdl_unix_common_ccxx_flags var)
30
30
append (${var} "-fPIC -Wformat -Wformat-security" )
31
31
endmacro ()
32
32
33
- macro (sdl_gnu_common_ccxx_flags var)
33
+ macro (sdl_gnu_common_ccxx_flags var gnu_version )
34
34
append (${var} "-fstack-protector-strong" )
35
- if (DNNL_TARGET_ARCH STREQUAL "X64" )
35
+ if (NOT (${gnu_version} VERSION_LESS 8.0)
36
+ AND (DNNL_TARGET_ARCH STREQUAL "X64" ))
36
37
append (${var} "-fcf-protection=full" )
37
38
endif ()
38
39
endmacro ()
@@ -61,7 +62,8 @@ if(UNIX)
61
62
append (ONEDNN_SDL_COMPILER_FLAGS "-D_FORTIFY_SOURCE=2" )
62
63
endif ()
63
64
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
64
- sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS)
65
+ sdl_gnu_common_ccxx_flags(ONEDNN_SDL_COMPILER_FLAGS
66
+ CMAKE_CXX_COMPILER_VERSION)
65
67
sdl_gnu_src_ccxx_flags(CMAKE_SRC_CCXX_FLAGS)
66
68
sdl_gnu_example_ccxx_flags(CMAKE_EXAMPLE_CCXX_FLAGS)
67
69
elseif (CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?[Cc]lang" )
You can’t perform that action at this time.
0 commit comments