I am trying to use CMake
to compile a C++ project on Ubuntu, but I get this error:
CMake Error: your C compiler: "/usr/lib64/ccache/bin/gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "/usr/lib64/ccache/bin/c++" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
I have gcc and everything installed (build-essential on Ubuntu), but I cannot stop cmake from doing this, except by hard-coding CMAKE_C_COMPILER
and CMAKE_CXX_COMPILER
in CMakeLists.txt, which I am loathe to do for obvious reasons. I tried installing ccache, but that had no effect.