Makefile 启用多进程编译
[http://stackoverflow.com/questions/601970/how-do-i-utilise-all-the-cores-for-nmake][1]
这个线程讨论了 nmake makefiles 以及“大多数”启动一个单独的文件的事实每个源文件的 cl.exe 进程。
Alnitak 说,“然而,大多数 makefile 不会将多个源文件放入编译器的单次调用中 - 将 .cpp 文件单独编译为 .o 文件更为常见。”
那么,是否可以创建一个 nmake makefile,通过一次调用 cl.exe 即可编译多个源文件?
(我不太擅长 makefile,所以这对其他人来说可能很容易!)
[http://stackoverflow.com/questions/601970/how-do-i-utilise-all-the-cores-for-nmake][1]
This thread talked about nmake makefiles and the fact that 'most' start a separate cl.exe process for every single source file.
Alnitak said,"However most makefiles don't put multiple source files into a single invocation of the compiler - it's far more common for the .cpp files to be compiled to .o files individually."
Well, is it possible to create an nmake makefile which can compile mulitple source files with a single call to cl.exe?
(I'm not too good with makefiles so this might be easy to someone else!)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,如果有人感兴趣,其他几个链接让我回答了我自己的问题...
更改较旧的 makefile 系统以利用并行编译
http://msdn.microsoft.com/en-us/library/f2x0zs74%28v=VS.90%29.aspx
所以答案是使用所谓的批处理模式推理规则。
Well a couple of other links have led me to answer my own question in case anyone is interested...
Change older makefile system to take advantage of parallel compiles
http://msdn.microsoft.com/en-us/library/f2x0zs74%28v=VS.90%29.aspx
So the answer is to use so called batch-mode inference rules.