Commit 2de70c7
authored
Fix PICO_DEOPTIMIZED_DEBUG not updating compiler flags (raspberrypi#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 raspberrypi#1618 and the comments of Pull Request raspberrypi#1620 for further details.
Fixes raspberrypi#16181 parent f5fea7f commit 2de70c7
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
0 commit comments