@Nullable List<String> buildCommand(VirtualFile file, CompileCppOptions options) { List<String> commandLine = new ArrayList<String>(4); if (!options.doRun()) { commandLine = BuildUtils.appendOptions(commandLine, "-S"); } else { final String fileName = options.getOutputFileName(); if (fileName != null) { commandLine = BuildUtils.appendOptions(commandLine, "-o"); commandLine = BuildUtils.appendOptions(commandLine, fileName); } } commandLine = defaultAppendOptions(options, commandLine, file); myItems = BuildUtils.buildEnvironmentMap(options.getProject(), file); return BuildUtils.buildClangToolCall( CppSupportSettings.getInstance().getClangPath(), commandLine); }
@Nullable List<String> buildCommand(VirtualFile file, CompileCppOptions options) { try { List<String> commandLine = Arrays.asList("cl.exe"); if (!options.doRun()) commandLine = BuildUtils.appendOptions(commandLine, "/c"); else { final String fileName = options.getOutputFileName(); if (fileName != null) { commandLine = BuildUtils.appendOptions(commandLine, "/Fe" + fileName); } } commandLine = defaultAppendOptions(options, commandLine, file); return BuildUtils.buildVCToolInvokation(commandLine); } catch (IOException e) { throw new RuntimeException(e); } }
@Nullable List<String> buildCommand(VirtualFile file, CompileCppOptions options) { List<String> command = new ArrayList<String>(4); if (!options.doRun()) command = BuildUtils.appendOptions(command, "-c"); else { final String fileName = options.getOutputFileName(); if (fileName != null) { command = BuildUtils.appendOptions(command, "-o"); command = BuildUtils.appendOptions(command, fileName); } } command = defaultAppendOptions(options, command, file); myItems = BuildUtils.buildEnvironmentMap(options.getProject(), file); String gccPath = CppSupportSettings.getInstance() .getGccPath() .replaceAll("gcc", options.isCppFile() ? "g++" : "gcc"); return BuildUtils.buildGccToolCall(gccPath, command); }