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

查看:162
本文介绍了从命令行构建几个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日)。您可以从构建页面下载最终版本的候选人: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,您可以使用以下命令在命令行中导入,构建和清理构建项目以及工作空间:

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.

'应用程序切换指示Eclipse运行CDT无头建筑师,而不是启动工作台。其他开关可以单独使用或一起使用。这意味着您可以使用您自己的shell脚本,使用Managedbuilder的无头构建器将' -import '转换为工作区,并使用em-build 来检出项目。

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

请参阅 bug 186847评论24 以及更多有关承诺功能的详细信息。

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

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

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