File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files 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 )
@@ -228,11 +229,11 @@ if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
228
229
PRIVATE
229
230
-Xclang -fblocks )
230
231
else ()
231
- # FIXME(compnerd) add check for -momit-leaf-frame-pointer?
232
- target_compile_options (dispatch
233
- PRIVATE
234
- -fblocks
235
- -momit-leaf-frame-pointer )
232
+ check_c_compiler_flag ( " -momit-leaf-frame-pointer -Werror -Wall -O3" C_SUPPORTS_OMIT_LEAF_FRAME_POINTER )
233
+ target_compile_options (dispatch PRIVATE -fblocks )
234
+ if ( C_SUPPORTS_OMIT_LEAF_FRAME_POINTER )
235
+ target_compile_options ( dispatch PRIVATE -momit-leaf-frame-pointer )
236
+ endif ( )
236
237
endif ()
237
238
if (LibRT_FOUND )
238
239
target_link_libraries (dispatch PRIVATE RT::rt )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments