Fix dependency generation for cuda.