pico-sdk/cmake/preload
Peter S. Hollander 2de70c79c2
Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags (#1620)
* Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags

Setting CMAKE_${LANG}_FLAGS_DEBUG_INIT specifically only sets the flags for the Debug config the first time it is configured by CMake, pulling the initially-configured flags from CMakeCache.txt on subsequent configurations. This causes PICO_DEOPTIMIZED_DEBUG to not have any effect after the initial configuration, causing breakpoint issues when debugging certain functions.

Clearing the cache of the debug flags allows the flags to be updated every configuration, and appended to appropriately (such as with "-g").

See Issue #1618 and the comments of Pull Request #1620 for further details.

Fixes #1618
2024-06-21 14:37:33 -05:00
..
platforms Initial Release 2021-01-20 10:44:27 -06:00
toolchains Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags (#1620) 2024-06-21 14:37:33 -05:00