Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7742

SDK • Re: How remove ALL compiler optimization in debug mode

$
0
0
In your CMakeLists.txt file change compile options

Code:

target_compile_options(${PROGRAM_NAME} PUBLIC -Wall -Wextra -Wnull-dereference -Wno-unused-parameter -Wno-null-dereference -Wno-sign-compare -Wno-pointer-sign -Wno-address -Wno-format -funsigned-char -ggdb3 -O1)
Or to be really simple:

Code:

target_compile_options(${PROGRAM_NAME} PUBLIC -ggdb3 -O0)
And then you must rerun cmake and rebuild.

Steve

Statistics: Posted by nospamcalfee — Wed May 06, 2026 11:18 pm



Viewing all articles
Browse latest Browse all 7742

Latest Images

Trending Articles



Latest Images