KDE TechBase is a Wiki - You can help! Please contribute! Questions?
Please ask development related questions in the KDE Community Forum.
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
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 |
|---|---|---|---|---|---|
| Release | yes | no | no | no | no |
| RelWithDebInfo | yes | yes | no | no | no |
| Debug | yes | yes | yes | yes | yes |
| debugfull | no | yes | yes | yes | yes |
| Profile | no | yes | yes | yes | yes |
[edit] Implementation Notes
Please refer to FindKDE4Internal.cmake for further details and the actual flags used.
