Trying to build OpenCV 3.3.1 with CUDA support, using ccache
:
- Ubuntu 16.04 LTS
- OpenCV 3.3.1
- CUDA 8.0
- CCACHE 3.2.4
Make fails for .cu
files, giving error:
/usr/bin/ccache: invalid option -- 'E'
Usage:
ccache [options] ...
I've added the /usr/lib/ccache
to PATH
, which cc
and which c++
outputs /usr/lib/ccache/cc
and /usr/lib/ccache/c++
respectively. Manually added a symlink for nvcc
in /usr/lib/ccache
directory, but now OpenCV CMakeLists.txt cannot find CUDA.
But interestingly I can build this sample CUDA code, with this CMake file without any issue.
I've searched the net and read most posts on SO and other forums, but had no success. I've had this issue for previous versions of OpenCV as well, but always disabled ccache
as a solution.
Can someone please explain the reason behind this error?