Description
On Ubuntu 16.04 with ccache installed, building fails due to duplicate usage of ccache.
When installing ccache via the standard debian packages it creates a directory with symlinks named like the compilers installed on the system, but which point to the ccache binary.
Usually you include this directory (/usr/lib/ccache) early in your PATH variable so cmake and others find them before the actual compilers and compile everything using ccache.
With the logic included in this projects cmake files to support ccache directly (#382) the compiler call is prefixed with a "ccache" call leading to a combined command line of:
ccache /usr/lib/ccache/c++ ...
This double use of ccache makes the build fail with this rather cryptic error:
src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/build.make:62: recipe for target 'src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/main.cpp.o' failed
make[2]: *** [src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/main.cpp.o] Error 111
Manually deleting the value of "CCACHE_FOUND" and building again fixes it.
Obviously removing the "/usr/lib/ccache" entry from you PATH before building would too.
Maybe there is a way to make this build without manual intervention?
Maybe check if the found compiler path already has a string "ccache" in it and then not use the special ccache treatment?