Bug 268082

Summary: FindKDE4Internal.cmake messes up CXX C flags
Product: [I don't know] kde Reporter: manolis <manolis>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal CC: cfeck
Priority: NOR    
Version: 4.6   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description manolis 2011-03-09 20:53:30 UTC
Version:           4.6 (using KDE 4.6.0) 
OS:                Linux

FindKDE4Internal.cmake messes up CXX C flags so It is impossible to use gdb to kdevelop without jumping up and down on command by command execution.
for example:
set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
-g -O2 should be -g3 -O0 to properly use the debugger gdb, standalone or in kdevelop.

Reproducible: Always

Steps to Reproduce:
just compile a cmake/kde project

Actual Results:  
compiling optimizations are used in debug flags for CXX and C

Expected Results:  
no optimizations are used when CMAKE_CXX_FLAGS_DEBUG/CMAKE_C_FLAGS_DEBUG is used
Comment 1 Christoph Feck 2011-03-09 23:38:22 UTC
Use -DCMAKE_BUILD_TYPE=DebugFull

http://techbase.kde.org/Development/CMake/Addons_for_KDE#Buildtypes