[Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Jun 1 10:57:41 UTC 2014


Dear Samuel Martin,

On Sun,  1 Jun 2014 11:24:25 +0200, Samuel Martin wrote:
> This patch updates the generated toolchainfile.cmake to use ccache.
> 
> When toolchainfile.cmake is used inside Buildroot, using ccache during
> the build is driven by a CMake knob: USE_CCACHE, automatically set by
> the cmake-package infrastructure and reflecting the BR2_CCACHE value.
> 
> Since this toolchainefile.cmake file can be used outside Buildroot, and
> this file also set a couple of things (among these: the sysroot cflag,
> some pkg-config environment variables), it is important to set the
> compiler variables as well to keep the consistency of the
> cross-compilation configuration.
> So, when it is used outside Buildroot, using ccache for the build is
> driven by the ccache program availability.
> 
> Note that using ccache for the build is achieved by setting the *_ARG1
> CMake variables to let CMake use ccache without failing in detecting
> the compiler.
> 
> Signed-off-by: Luca Ceresoli <luca at lucaceresoli.net>
> Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
> Cc: Luca Ceresoli <luca at lucaceresoli.net>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>

Reviewed-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list