cmake: set MAX_CUSTOM_OPT_LEVEL to -O3 if Release

This commit is contained in:
Daniel Agar 2021-05-04 16:57:16 -04:00
parent 3b7ce61901
commit f5b6656a6c
1 changed files with 2 additions and 0 deletions

View File

@ -185,6 +185,8 @@ if((CMAKE_BUILD_TYPE STREQUAL "Debug") OR (CMAKE_BUILD_TYPE STREQUAL "Coverage")
set(MAX_CUSTOM_OPT_LEVEL -O0)
elseif(CMAKE_BUILD_TYPE MATCHES "Sanitizer")
set(MAX_CUSTOM_OPT_LEVEL -O1)
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
set(MAX_CUSTOM_OPT_LEVEL -O3)
else()
if(px4_constrained_flash_build)
set(MAX_CUSTOM_OPT_LEVEL -Os)