-2

I am totally new to CMake and compiled languages for that matter. I have seen this question and answer. But I still don't fully understand what CMake is.

I am coming from a nodeJs/Javascipt environment, therefore if I could know a CMake equivalent in the nodeJs/Javascipt environment it would really help me understand what it is.So... Is CMake an equivalent of npm?

4

1 回答 1

1

不,引用维基百科:

CMake 是一个跨平台的免费和开源软件工具,用于使用独立于编译器的方法管理软件的构建过程。它支持目录层次结构和依赖于多个库的应用程序。它与 Make、Qt Creator、Ninja、Apple 的 Xcode 和 Microsoft Visual Studio 等原生构建环境结合使用。它具有最小的依赖关系,只需要在自己的构建系统上使用 C++ 编译器。

JavaScript 是一种解释性语言,这意味着 NodeJS/浏览器可以读取和理解代码并直接执行它。例如,C 是通过编译器(在执行之前读取并理解代码)构建到机器代码(不需要理解,因为它是处理器的本机语言),并且可以更快地执行。requireCMake 简化了对所有文件的调用编译器、链接库(类似于设置)等。Altough 有时使用babel,webpack而其他 vianpm run被称为“建筑”。

于 2019-09-29T06:12:10.760 回答