On a MacOS 10.12: Assuming your NVCC support only clang version ‘8000’. In that case you want to downgrade your Xcode version to 8.2, by following these simple steps:
- Download X_Code 8.2
- Unzip “Xcode_8.2.xip” and movie it to “Application folder” as /Applications/Xcode_8.2.app
sudo xcode-select -s /Applications/Xcode_8.2.app/Contents/Developer
- Check version by Run
/usr/bin/cc --version, it should be Apple LLVM version 8.0.0
Note: Sometimes, the previous clang compiler generated build files that were not entirely cleared. Be sure to delete all the build files if the method above is not working and you are still getting an error.
Taken from here