我正在尝试使用incredibuild来加速在命令行中编译cmake项目,使用Visual Studio 2013进行编译。 我可以使用以下命令编译和安装库:
BuildConsole zlib.sln /prj=INSTALL /cfg="Debug|x64"
但是它会跳过安装部分:
Microsoft Visual Studio 2013 Version 12.0.40629.0.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
1>Project not selected to build for this solution configuration
但是,如果我从Visual Studio执行它,它可以正常工作:
Initializing...
Microsoft Visual Studio 2013 Version 12.0.40629.0.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: INSTALL, Configuration: Debug x64 ------
1>Build started 1/6/2016 4:52:09 PM.
1>PrepareForBuild:
1> Creating directory "x64\Debug\INSTALL\INSTALL.tlog\".
1>InitializeBuildStatus:
1> Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
1>PostBuildEvent:
1> -- Install configuration: "Debug"
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/lib/zlibd.lib
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/bin/zlibd.dll
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/lib/zlibstaticd.lib
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/include/zconf.h
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/include/zlib.h
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/share/man/man3/zlib.3
1>-- Installing: C:/work/dev/workspace/thirdparty/tmp/install/zlib/share/pkgconfig/zlib.pc
1> ...
1>
1>FinalizeBuildStatus:
1> Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
1> Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.40
========== Build: 1 succeeded, 0 failed, 6 up-to-date, 0 skipped ==========
有任何线索吗?
谢谢! 灵光
答案 0 :(得分:0)
此回复来自IncrediBuild团队: 我们已经在我们的实验室中下载并尝试了与Microsoft Visual Studio 2013相同的zlib-1.2.8版本。 我们发现在zlib中默认情况下,当使用cmake生成.sln和.vcxproj文件时,生成的INSTALL项目不包含在构建配置中" Debug | x64"。 为" Debug | x64"构建生成的zlib.sln时,它不构建INSTALL项目,不通过VS IDE构建,也不构建BuildConsole命令 - 这很好,因为项目未包含在构建配置。 将INSTALL项目标记为已选中以构建在" Debug | x64" 配置,没有跳过它的问题,项目正确构建。 选择为#34; Debug | x64"显式构建此项目。或者修复zlib cmake以包含要在" Debug | x64"中构建的项目。解决了这个问题。
免责声明:作者是IncrediBuild员工
答案 1 :(得分:0)
适用于我的解决方案首先在解决方案上运行MSBuild,然后分别在Install.vcxproj上运行。这与IncrediBuild完全无关,我只使用普通的MSBuild。我想IncrediBuild可用于解决方案,然后安装项目上的MSBuild。
实际上,在我的情况下(没有IncrediBuild)只需在Install.vcxproj上运行MSBuild即可,它会检测依赖项并在安装项目之前构建其他项目。