从命令行构建几个CDT C ++项目 [英] Build several CDT C++ projects from commandline

查看:568
本文介绍了从命令行构建几个CDT C ++项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从命令行构建多个CDT C ++项目的最佳解决方案是什么?

What is the best solution to build several CDT C++ projects from the command line? The projects have references and so it is not possible to just build single projects.

推荐答案

此功能已添加到CDT 6最终版本于2009年6月15日起生效)。您可以从builds页面下载最终版本候选版本:download.eclipse.org/tools/cdt/builds/6.0.0 /.

This feature has been added in CDT 6 (Final build due June 15th 2009). You can download the final release candidate from builds page: download.eclipse.org/tools/cdt/builds/6.0.0/.

使用Eclipse 3.5 + CDT 6,您可以使用以下命令行发送到Eclipse的选项导入,构建和清理构建项目和工作空间:

Using a release of Eclipse 3.5 + CDT 6, you can import, build and clean-build projects and the workspace using the following options sent to Eclipse at the command line:

eclipse -nosplash 
        -application org.eclipse.cdt.managedbuilder.core.headlessbuild 
        -import {[uri:/]/path/to/project} 
        -build {project_name | all} 
        -cleanBuild {projec_name | all}

在Windows上,使用 eclipsec.exe ,而不是 eclipse.exe 已将构建输出写入stdout / stderr,以便调用阻塞,直到完成。

On Windows, use eclipsec.exe instead of eclipse.exe to have build output written to stdout/stderr and so that the call blocks until completion.

' -application '开关指示Eclipse运行CDT无头构建器,而不是启动工作台。其他开关可单独使用或一起使用。这意味着您可以使用自己的shell脚本签出项目,emport 进入工作区,并使用Managedbuilder的无头构建器建立。

The '-application' switch instructs Eclipse to run the CDT headless builder rather than starting the workbench. The other switches can be used individually or together. This means you can checkout a project using a shell script of your own, '-import' it into a workspace, and '-build' it using the Managedbuilder's headless builder.

使用 -data 开关指定要使用的工作空间,可以是空的临时目录,请参阅其他开关由平台运行时支持:
help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html

Use the '-data' switch to specify the workspace to use, which can be an empty temporary directory, see the runtime documentation for other switches supported by the platform runtime: help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html

请参阅错误186847评论24 及以上有关承诺功能的更多细节。

See bug 186847 comment 24 and onwards for more detail on the committed functionality.

这篇关于从命令行构建几个CDT C ++项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆