File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,11 @@ if(NOT MSVC)
57
57
add_compile_options (-fPIC -Wall -Wpedantic
58
58
$< $< CXX_COMPILER_ID:GNU> :-fdiagnostics-color=always>
59
59
$< $< CXX_COMPILER_ID:Clang,AppleClang> :-fcolor-diagnostics> )
60
+ if (CMAKE_BUILD_TYPE STREQUAL "Release" )
61
+ add_compile_options (-D_FORTIFY_SOURCE=2 )
62
+ endif ()
60
63
if (UR_DEVELOPER_MODE )
61
- add_compile_options (-Werror -fno-omit-frame-pointer )
64
+ add_compile_options (-Werror -fno-omit-frame-pointer -fstack-protector-strong )
62
65
endif ()
63
66
# Determine if libstdc++ is being used.
64
67
check_cxx_source_compiles ("
@@ -81,7 +84,7 @@ elseif(MSVC)
81
84
add_compile_options (/MP /W3 /MD$<$<CONFIG:Debug>:d> )
82
85
83
86
if (UR_DEVELOPER_MODE )
84
- add_compile_options (/WX )
87
+ add_compile_options (/WX /GS )
85
88
endif ()
86
89
endif ()
87
90
You can’t perform that action at this time.
0 commit comments