KDE TechBase
  • Page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.

Development/CMake/Build Types

< Development | CMake

CMake supports different build types for compiling the source code. The following built-in build types are available to the CMake buildsystem:


Note
noframe
The build types are case-sensitive. This may be fixed in the future however, so don't rely on this behavior.


Release
optimized for speed, no debug symbols or qDebug/kDebug messages, no asserts
RelWithDebInfo
similiar to release, but with debug symbols for backtraces (-g)
Debug
optimized for speed, but debuggable and with debug symbols for backtraces (-g)
debugfull
no optimizations, full debug support (-g3)
Profile
adds coverage flags (-ftest-coverage -fprofile-arcs) to debugfull
None
the build flags are manually set using the CMAKE_CXX_FLAGS option.

You can tell CMake the desired build type by passing the relevant type as command line option, for instance:

cmake /path/to/source -DCMAKE_BUILD_TYPE=debugfull

The default value is RelWithDebInfo.

[edit] Debugging Features in Detail

CMAKE_BUILD_TYPE Optimized Symbols qDebug kDebug Asserts
Releaseyesnononono
RelWithDebInfoyesyesnonono
Debugyesyesyesyesyes
debugfullnoyesyesyesyes
Profilenoyesyesyesyes

[edit] Implementation Notes

Please refer to FindKDE4Internal.cmake for further details and the actual flags used.

Retrieved from "http://techbase.kde.org/Development/CMake/Build_Types"

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • 38.107.191.97
  • Talk for this IP
  • Log in / create account
  • Login with OpenID
Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal