selectively increase optimization -Os -> -O2

- targetted at modules/libraries that benefit without drastically
increasing flash usage
 - ignored on boards with CONSTRAINED_FLASH set
This commit is contained in:
Daniel Agar
2020-06-04 20:59:52 -04:00
parent 7f73b9a131
commit 31fe7af454
26 changed files with 71 additions and 34 deletions
@@ -37,6 +37,7 @@ px4_add_module(
MODULE modules__mc_rate_control
MAIN mc_rate_control
COMPILE_FLAGS
${MAX_CUSTOM_OPT_LEVEL}
SRCS
MulticopterRateControl.cpp
MulticopterRateControl.hpp
@@ -33,12 +33,10 @@
px4_add_library(RateControl
RateControl.cpp
RateControl.hpp
)
target_include_directories(RateControl
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
target_compile_options(RateControl PRIVATE ${MAX_CUSTOM_OPT_LEVEL})
target_include_directories(RateControl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(RateControl PRIVATE mathlib)
px4_add_unit_gtest(SRC RateControlTest.cpp LINKLIBS RateControl)