File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change
1
+ include (CheckCCompilerFlag )
1
2
2
3
include (SwiftSupport )
3
4
include (DTrace )
@@ -229,11 +230,11 @@ if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
229
230
PRIVATE
230
231
-Xclang -fblocks )
231
232
else ()
232
- # FIXME(compnerd) add check for -momit-leaf-frame-pointer?
233
- target_compile_options (dispatch
234
- PRIVATE
235
- -fblocks
236
- -momit-leaf-frame-pointer )
233
+ check_c_compiler_flag ( " -momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER )
234
+ target_compile_options (dispatch PRIVATE -fblocks )
235
+ if ( C_SUPPORTS_OMIT_LEAF_FRAME_POINTER )
236
+ target_compile_options ( dispatch PRIVATE -momit-leaf-frame-pointer )
237
+ endif ( )
237
238
endif ()
238
239
if (LibRT_FOUND )
239
240
target_link_libraries (dispatch PRIVATE RT::rt )
You can’t perform that action at this time.
0 commit comments