CMake:生成批处理文件,调用cl.exe [英] CMake: Generating batch file calling cl.exe

查看:286
本文介绍了CMake:生成批处理文件,调用cl.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CMake是构建系统生成器,它支持不同的构建系统和环境,例如make,Visual Studio,代码块,eclipse-cdt等. 要生成项目,可以使用-G选项指定项目生成器.

CMake is a build system generator supporting different build systems and environments like make, visual studio, code-blocks, eclipse-cdt, etc... To generate a project, you can use the -G option to specify the project generator.

是否可以选择,是否有任何项目,或者是否可以编写 generator 来创建调用 cl.exe 的批处理文件,所以我不必每次都打开Visual Studio吗?

Is there an option, are there any projects, or is it possible to write a generator that creates batch files calling cl.exe so I don't have to open visual studio every time?

推荐答案

CMake可以使用--build选项自行调用构建工具(在本例中为MSBuild).有关更多详细信息,请参见此问题.

CMake is able to invoke the build tool (MSBuild in this case) by itself, using the --build option. See this question for more details.

这篇关于CMake:生成批处理文件,调用cl.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆