From f5b6656a6c7284c168381061e28e44e06f9dd738 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 4 May 2021 16:57:16 -0400 Subject: [PATCH] cmake: set MAX_CUSTOM_OPT_LEVEL to -O3 if Release --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91de839b42..a694590e1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)