If you view ninja.build, it has relevant compiler commands (in your case nms_kernel.cu build is failing). I think your build file doesn’t contain absolute filenames, then try either running from directory with sources “ninja -f <full_path_to_ninja.build>” or copy compiler command from build file.
Actually, I think there is some setup.py flag for verbose output, but I can’t tell this specifically right now.