Studio中使用Makefile的好技巧

Studio中使用Makefile的好技巧

本文介绍了在Visual Studio中使用Makefile的好技巧?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我知道构建项目的理想方法是不需要基于IDE的项目文件,因为从理论上讲,这会引起自动化方面的种种麻烦,而其他方面则不会.但是我还没有在不依赖VisualStudio项目的Windows上编译的项目上工作(好吧,显然有些开源项目是用Cygwin完成的,但是我在这里很笼统).

I know the ideal way to build projects is without requiring IDE based project files, since it theoretically causes all sort of trouble with automation and what not. But I've yet to work on a project that compiles on Windows that doesn't depend on the VisualStudio project (Ok, obviously some Open Source stuff gets done with Cygwin, but I'm being general here).

另一方面,如果仅使用VS运行makefile,则会失去编译选项窗口的所有好处,并且维护外部makefile变得很痛苦.

On the other hand if we just use VS to run a makefile, we loose all the benefits of the compile options window, and it becomes a pain to maintain the external makefile.

那么使用VS的人如何实际处理外部Makefile?我还没有找到可以轻松执行此操作的系统...

So how do people that use VS actually handle external makefiles? I have yet to find a painless system to do this...

还是实际上大多数人都没有这样做,尽管它被宣告为一种很好的做法?

Or in reality most people don't do this, although its preached as good practice?

推荐答案

我们使用NAnt脚本,该脚本在编译步骤中调用MSBuild.使用NAnt可使我们执行构建前和构建后任务,例如设置版本号以匹配源代码控制修订号,整理代码覆盖率信息,组装和压缩部署源.但是,从本质上讲,实际上是MSBuild在进行编译.

We use a NAnt script, which at the compile step calls MSBuild. Using NAnt allows us to perform both pre- and post-build tasks, such as setting version numbers to match source control revision numbers, collating code coverage information, assembling and zipping deployment sources. But still, at the heart of it, it's MSBuild that's actually doing the compiling.

您可以将NAnt构建作为自定义工具集成到IDE中,以便可以在构建或连续集成服务器上以及开发人员以相同的方式使用它.

You can integrate a NAnt build as a custom tool into the IDE, so that it can be used both on a build or continuous integration server and by the developers in the same way.

这篇关于在Visual Studio中使用Makefile的好技巧?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 20:21