Fix assert macro on Apple/clang when using default cmake build

This commit is contained in:
Jonathan G Rennison
2022-11-03 19:00:25 +00:00
parent 9abc6f9aec
commit fb67adbd82

View File

@@ -96,7 +96,10 @@ macro(compile_flags)
if(NOT CMAKE_BUILD_TYPE)
# Sensible default if no build type specified
add_compile_options(-O2 -DNDEBUG)
add_compile_options(-O2)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_compile_options(-DNDEBUG)
endif()
endif(NOT CMAKE_BUILD_TYPE)
# When we are a stable release (Release build + USE_ASSERTS not set),