以前只知道IncrediBuild可以通过分布式加速vs的编译, 近来才发现, 此工具还是很强大的, android 的 ndk 也能用它来作加速处理(windows环境)
操作如下:
1.安装此软件并设置环境变量
2.修改 android-ndk 目录下的 ndk-build.cmd 文件 把其中的
"%NDK_ROOT%prebuilt/%NDK_WIN_HOST%/bin/make.exe" -f "%NDK_ROOT%build/core/build-local.mk" SHELL=cmd %*
修改为
XGConsole /command="%NDK_ROOT%prebuilt/%NDK_WIN_HOST%/bin/make.exe -f %NDK_ROOT%build/core/build-local.mk SHELL=cmd %*" /profile=Profile.xml
3.在你的工程目录也就是在执行 ndk-build 命令的目录下 编写 Profile.xml 文件
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Profile FormatVersion="1">
<Tools>
<Tool Filename="make" AllowIntercept="true" />
<Tool Filename="cl" AllowRemote="true" />
<Tool Filename="link" AllowRemote="true" />