如何让其他xgsubmitted任务与Visual Studio构建任务共享cpus?
我可以使用incredibuild作为Visual Studio扩展包来使用许多cpus构建我的代码。如何让其他xgsubmitted任务与Visual Studio构建任务共享cpus?
另外我可以使用xgconsole msbuild ...命令。
但是,如果我想同时添加一些其他任务与vc构建。所以,我想它在某些方面:
-
使用批处理config.bat:
xgSubmit /command task1 xgSubmit /command task2 msbuild ***.sln /t:rebuild
然后使用命令
xgConsole /command="config.bat” /profile=pro.xml
我的pro.xml如下:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tools>
<Tool Filename="MSBuild" AllowIntercept="true" />
<Tool Filename="Tracker" AllowIntercept="true" />
<Tool Filename="CL" AllowIntercept="true" />
<Tool Filename="Tracker" AllowRemote="true" />
<Tool Filename="CL" AllowRemote="false" />
</Tools>
</Profile>
但问题是,跟踪器进程创建的CL过程,则该过程CL创造了很多其他CL过程。所以我将cl设置为xml配置文件中的AllowIntercept和AllowRemote。但是使用这个xml配置,xgconsole不能将cl进程分派给其他cpus,只是报告一个错误。
- 所以,我试图另一种方式: 我重命名的Visual Studio cl.exe时作为clChild.exe和备份另一个,它的名称作为clorigin.exe。
然后我设计了自己的cl.exe
。在我自己的cl.exe
中,我检查父进程是否为tracker.exe
,然后我启动clorigin.exe
,并将para命令传递给它,然后等待clorigin.exe
终止;如果父进程是cl.exe
,那么我开始clchild.exe
。
但这种方式也没用。简单地说,你可以认为它是没用的。
所以,我想也许我不应该开始 StartProcess
API,它只是开始另一个过程;也许我应该把它作为unix中的execute
api,当启动一个子进程时,在taskmanager中它只能看到父进程,这意味着只需要父进程来完成另一个exe的任务,而不是创建一个新的进程id ?
也许我认为是错误的方式,但如何让其他任务共享并同时用visual studio编译任务分派给多个cpus?
使用IncrediBuild Visual Studio插件(或BuildConsole命令)是使用IncrediBuild执行解决方案的最简单和最优化(性能明智)的方法。如果您更愿意使用自定义配置文件执行您的构建,那么您的配置文件。XML应该如下(请注意跟踪器不应该在配置文件中提到的):
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tools>
<Tool Filename="MSBuild" AllowIntercept="true" />
<Tool Filename="cl" AllowRemote="True" DeriveCaptionFrom="lastparam" VCCompiler="True" VCCompilerUnbatch="True" />
<Tool Filename="link" AllowRemote="false" DeriveCaptionFrom="firstparam" VCLinker="True" MonitorFileChanges="true" />
</Tools>
</Profile>
(该作家在IncrediBuild工作)