I just tried that – I don’t have a ccache directory though so I missed that out. I also added all the others just in case:
$ mkdir compilers; cd compilers
$ ln -s /usr/local/bin/g++-5 g++
$ ln -s /usr/local/bin/gcc-5 gcc
$ ln -s /usr/local/bin/gcc-ar-5 gcc-ar
$ ln -s /usr/local/bin/gcc-nm-5 gcc-nm
$ ln -s /usr/local/bin/gcc-ranlib-5 gcc-ranlib
$ cd ..
$ PATH=~/Documents/GitRepos/pytorch/compilers/:$PATH python setup.py bdist_wheel 

I get this again:
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:6 (project):
  The CMAKE_CXX_COMPILER:

    /usr/local/bin/g++-8

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!

I don’t know why it’s defaulting to g++-8 still…
$ compilers/gcc --version
gcc (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.