String nvcc_path = cuda_path.get();
cmd[0] = nvcc_path;
cmd[1] = "--version";
}
CmdRunner runner = new CmdRunner();
runner.run(cmd, new File("."));
List<String> lines = runner.getOutput();
if(lines.isEmpty()){
List<String> error_lines = runner.getError();
for(String error_line : error_lines){
System.out.println(error_line);
}
throw new RuntimeException("error detecting nvcc version.");
}