可以CMake生成构建脚本,*不*使用cmake? [英] Can CMake generate build scripts which do *not* use cmake?

查看:253
本文介绍了可以CMake生成构建脚本,*不*使用cmake?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:CMake能否生成不以任何方式使用CMake的构建脚本?如果没有,那么CMake生成的automake脚本有多难以对CMake做任何检查?

Question: Can CMake generate build scripts that do not, in any way, use CMake? If not, how hard is it to gut a CMake generated automake script to not make any checks against CMake?

我是CMake的忠实粉丝,支持我们在目前的工作环境中过渡到这个想法。有一件事可以缓解从目前的构建系统到CMake的过渡,如果我能证明CMake可以生成不需要cmake的automake文件。

I am a big fan of CMake to the point where I am championing the idea that we transition to it in my current work environment. One thing that could ease this transition from our current build system to CMake would be if I could demonstrate that CMake can generate automake files that do not require cmake themselves.

很明显,我永远不想这样做的日常使用,但有能力轻松地创建一个我们的代码,可以从源代码建立一个分支,而不需要cmake将在很大程度上帮助我使我的情况。

Clearly, I would never want to do this for day to day use, but having the ability to easily create a branch of our code that can be built from source without requiring cmake would go a long way in helping me make my case.

推荐答案

不,CMake不能这样做。它也没有什么意义,因为没有任何CMake支持在构建时,没有办法检查或更新makefiles /项目文件本身,当CMakeLists.txt文件已更改。

No, CMake cannot do this. It doesn't really make sense, either, since without any CMake-support at build-time, there would be no way to check or update the makefiles/project-files themselves when the CMakeLists.txt files have changed.

如果你从Visual Studio移动到CMake,你可能想看看 vcproj2cmake

If you are moving from Visual Studio to CMake, you may want to take a look at vcproj2cmake.

这篇关于可以CMake生成构建脚本,*不*使用cmake?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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