Projects/Edu/KStars/C++ developer tools with KStars on Linux

From KDE TechBase
< Projects‎ | Edu‎ | KStars
Revision as of 14:15, 3 June 2017 by Ckertesz (talk | contribs) (Created page with "This page describes how to use open-source C++ tools to hunt down memory errors and improve the code quality. === CCache === Official homepage: https://ccache.samba.org CCa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page describes how to use open-source C++ tools to hunt down memory errors and improve the code quality.

CCache

Official homepage: https://ccache.samba.org

CCache is a useful tool to cache the compiled object files to avoid recompilation of the same source files. A typical use case is changing git branches when some include files are modified. By default, the compiler would recompile the affected source files after each branch checkout. With CCache, the build system can get the already-compiled object file from a local cache on the disk if available.

Install CCache on Ubuntu Linux:

  sudo apt-get install ccache

Add the -DCCACHE_SUPPORT=ON to the CMake flags to enable this feature. For example:

  cmake . -DCCACHE_SUPPORT=ON

You can build KStars after these steps normally, CMake will put the compiler invocation after the ccache command and the object files will be saved to the local cache when a make command is executed.