cmake在命令行上创建可视工作室解决方案 [英] cmake creating visual studio solution on the command line

查看:192
本文介绍了cmake在命令行上创建可视工作室解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cmake 2.6.4
WinXP Pro
在Visual studio 2008 VC Express版本上编译

I am using cmake 2.6.4 WinXP Pro Compiling on Visual studio 2008 VC Express edition

我可以创建解决方案文件使用cmake-GUI。但是,我不想使用cmake-GUI,因为我总是喜欢命令行。

I can create the solution files by using the cmake-GUI. However, I don't want to use the cmake-GUI, as I always prefer the command line.

但是,我有一个问题,创建解决方案文件从命令行。

However, I am having a problem creating the solution file from the command line.

我正在做out of source,这是我的目录结构:

I am doing 'out of source' and this is my directory structure:

project/
    src/
    build/

cmake从构建目录。

I can run cmake from the build directory.

cmake ../src

但是,当我尝试这样:

cmake ../src --visual studio 2008

它不工作,也不创建解决方案文件。

It doesn't work and doesn't create the solution files.

我做错了什么?

非常感谢任何建议,

推荐答案

是的,你做错了。
尝试调用

Yes, you are doing it wrong. Try invoking

cmake

$

对于您的特定情况,它将是:

For your specific case, it will be:

cmake -G "Visual Studio 9 2008" ..\src

这篇关于cmake在命令行上创建可视工作室解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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