哪个适合linux?GNU make vs cmake vs codeblocks vs qmake

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4060632/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-04 23:51:00  来源:igfitidea点击:

which suits linux ? GNU make vs cmake vs codeblocks vs qmake

linuxcross-platformmakefilecmake

提问by Ismail Marmoush

In front of me some different Technologies and I'm confused between them. GNU make, CMAKE, Qmake, Code::blocks methodology

在我面前有一些不同的技术,我对它们感到困惑。GNU make、CMAKE、Qmake、Code::blocks 方法论

Code::Blocks uses a custom build system, which stores its information in XML-based project files, but can optionally use external makefiles **says WIKI**
Code::Blocks 使用自定义构建系统,将其信息存储在基于 XML 的项目文件中,但可以选择使用外部 makefile **如 WIKI **

1- What's the difference between CMAKE and GNU MAKE ?

1- CMAKE 和 GNU MAKE 有什么区别?

2- If I'm planning for long term relationship with linux what is the best for that ?

2- 如果我打算与 linux 建立长期关系,那么最好的方法是什么?

3- If I needed to cross-platform some apps, will I need the same technique ?

3- 如果我需要跨平台某些应用程序,我需要相同的技术吗?

采纳答案by mikerobi

CMake generates platform specific make files. So on Linux, it wil generate files for gnu make, on windows it can generate Visual Studio solutions.

CMake 生成特定于平台的 make 文件。所以在 Linux 上,它会为 gnu make 生成文件,在 Windows 上它可以生成 Visual Studio 解决方案。

There are some other good options to consider like sconsand waf, they are both Python based, cross platform, and are much more pleasant to work with than GNU Make.

还有其他一些不错的选择,比如sconswaf,它们都是基于 Python 的、跨平台的,并且比 GNU Make 更容易使用。

回答by sali

CMake is a cross-platform wrapperaround more traditional build systems. like make for linux and Visual Studio Solutions for windows.

CMake 是围绕更传统构建系统的跨平台包装器。比如 Linux 的 make 和 Windows 的 Visual Studio 解决方案。

"One nice feature of CMake is the ability to do out of source builds. That means you can make all your .ofiles and even the binary executables without cluttering up your source tree."

“CMake 的一个很好的功能是能够进行源代码构建。这意味着您可以制作所有.o文件甚至二进制可执行文件,而不会弄乱您的源代码树。”

I found this tutorialvery helpful.

我发现这个教程非常有帮助。