This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Compiling with cxxflags set

Tags: None
(comma "," separated)
efrancois
Registered Member
Posts
1
Karma
0

Compiling with cxxflags set

Wed Mar 22, 2023 12:08 pm
Greetings,

I'm newer to KDE and I'm attempting to tackle one of the smaller bugs in the bugs list. I'm using gdb to debug the application but the variables all seem to be "optimized out" when I run the debugger. From what I understand, you need to pass in the "-g" and "-O0" compiler flags to avoid this. I've tried to set the following options in
~/.config/kdesrc-buildrc:

cmake-options -DCMAKE_BUILD_TYPE=Debug

cxx-flags -g -O0

and then rebuilt the project, but it doesn't seem to fix the problem. I also tried to set the flags in CMakeLists.txt using

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0)

but that didn't work either so I'm not sure where to go from here. Any tips would be greatly appreciated :)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]