cmake: Readd fomit-frame-pointer on macOS
Make it also properly set on Release for multi-configuration generators
This commit is contained in:
parent
8f355962ce
commit
ff4ef08745
|
@ -221,6 +221,11 @@ if(NOT MSVC)
|
|||
check_and_add_flag(INIT_SELF -Winit-self)
|
||||
check_and_add_flag(MISSING_DECLARATIONS -Wmissing-declarations)
|
||||
check_and_add_flag(MISSING_VARIABLE_DECLARATIONS -Wmissing-variable-declarations)
|
||||
|
||||
check_c_compiler_flag(-fomit-frame-pointer FLAG_C_FOMIT_FRAME_POINTER)
|
||||
if(FLAG_C_FOMIT_FRAME_POINTER)
|
||||
add_compile_options($<$<CONFIG:Release>:-fomit-frame-pointer>)
|
||||
endif()
|
||||
endif(NOT MSVC)
|
||||
|
||||
# gcc uses some optimizations which might break stuff without this flag
|
||||
|
@ -343,10 +348,6 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|||
endif()
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release AND NOT APPLE)
|
||||
add_definitions(-fomit-frame-pointer)
|
||||
endif()
|
||||
|
||||
if(FASTLOG)
|
||||
add_definitions(-DDEBUGFAST)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue