Questions tagged [ccache]

ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Supported languages are C, C++, Objective-C and Objective-C++.

The source code is hosted on GitHub:

The home page for the project (with links to documentation and downloads) is:

105 questions
0
votes
0 answers

Github Action - Can't build gtest using ccache, mingw, cmake and ninja

I am using this workflow: cmake_build.yaml Here is my toplevel CMakeLists.txt: cmake_minimum_required(VERSION 3.15) project( container VERSION 0.1.0 DESCRIPTION "An extension to the standard container library in c++" HOMEPAGE_URL "" …
Zaki
  • 107
  • 9
0
votes
1 answer

How to check which calls to ccache were uncacheable

I have a cmake/C++/Qt project which I've started to onboard onto ccache. For that, I installed ccache with homebrew, set the build system generator as ninja, and added -DCMAKE_CXX_COMPILER_LAUNCHER=ccache to the project. and in the first test run…
RAM
  • 2,257
  • 2
  • 19
  • 41
0
votes
0 answers

How to set localslots_cpp when distcc is used with ccache?

From distcc's documentation I understand that localslots_cpp can limit the concurrency of preprocessing. But the setting of localslots_cpp doesn't work when called via ccache.
zcfh
  • 101
  • 1
  • 9
0
votes
0 answers

Docker and ccache: What is the difference between buildkit cache mount and a regular bindmount?

All we need is to allow the ccache cache to persist. I think I understand that the buildkit cache mount allows us to provide cache access at the granularity of a layer, which definitely seems useful, but in the ccache case it's actually potentially…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
0
votes
1 answer

CMake install very slow, but much faster with ccache

So I found that my build is very slow with CMake when I do install. One package in particular is taking ~1:20 minutes to build and ~1:40 to install. It's not installing terrabytes of data, and installation is just moving some files around, so I was…
CodeMonkey
  • 4,067
  • 1
  • 31
  • 43
0
votes
0 answers

How to make ccache exclude checking for specific files

I used cmake to build a c++ project, but ccache didn't hit when I switched the git branch back. How do I avoid recompiling because the current code is exactly the same as before.
zp c
  • 3
  • 1
0
votes
2 answers

How should I use ccache if the compiler absolute path is hard-coded in the makefile?

It's not an option for me to modify the complicated nest of makefiles that builds our code, and in various places they construct absolute paths to very specific compilers, e.g.…
0
votes
2 answers

How ccache improves building speed?

I am using cmake to setup my project and when I change a file in a project, I found my cmake knows to only recompile the changed file and then relink everything together for the final executable/lib. I then read through the documentation about…
shelper
  • 10,053
  • 8
  • 41
  • 67
0
votes
1 answer

Can ccache influence error in subsequent android build

I don't really understand (I've read but I'm not yet sure) how ccache works, so my question could be stupid, but I was wondering if during the debugging phase using it could be an issue instead of a help. I'll explain better: let's say that starting…
0
votes
3 answers

How to utilize host caches in a singularity build?

I'm looking for ways to optimize the build time of our singularity HPC containers. I know that I can save some time by building them layer by layer. But still, there is room for optimization. What I'm interested in is using/caching whatever makes…
Martin Pecka
  • 2,953
  • 1
  • 31
  • 40
0
votes
1 answer

CCACHE and DISTCC support for non-gcc tools?

We're looking at ways to speed our compilation up for our project that uses Keil, Xtensa, and potentially another non-gcc compiler tool for a 3rd flavor of core in the chip. I've been searched for "keil ccache" or "cross-compile ccache", but…
Russ Schultz
  • 2,545
  • 20
  • 22
0
votes
1 answer

Speeding up C++ builds with Unity Builds and reduced header dependencies

I just converted an Objective-C(++) project to plain C++. While moving more and more code over, I noticed the build time increase quite a lot. My project is currently split up into several frameworks/dylibs and a main project which uses these…
guitarflow
  • 2,930
  • 25
  • 38
0
votes
0 answers

How to globally override compiler in qmake with subprojects?

Can I somehow override define QMAKE_CXX globally for all subprojects of a .pro file? Placing this statement to the top project file did not change the compiler in subprojects. It only works if I copy it to every .pro file. I would like to define…
feedc0de
  • 3,646
  • 8
  • 30
  • 55
0
votes
1 answer

ccache basedir doesn't work as expected

I'm trying to make ccache work with the same source code built from different sibling directories. I've successfully set CCACHE_BASEDIR to the parent dir of these two siblings. If I do a build in bld1 and then switch to bld2 and build that copy…
Mike Ellery
  • 2,054
  • 3
  • 21
  • 30
0
votes
2 answers

ccache does not hit cache without deleting CMake files

I am trying to use ccache with CMake. I have placed symlinks named gcc, g++ and c++ in /usr/local/bin. If I run make, add some change to CMakeLists.txt that does not affect the compiled files (add unused library just to force make build all the…
Dmitry Risenberg
  • 2,321
  • 2
  • 18
  • 22
1 2 3 4 5 6
7