cmake也是个恶大的玩意

/home/user# apt show scons
Package: scons
Version: 4.4.0+dfsg-1
Priority: optional
Section: devel
Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Installed-Size: 2,671 kB
Depends: python3-pkg-resources, python3:any
Suggests: scons-doc
Homepage: https://www.scons.org/
Tag: devel::buildtools, implemented-in::python, interface::commandline,
 role::program, scope::utility
Download-Size: 663 kB
APT-Manual-Installed: yes
APT-Sources: http://mirrors.tuna.tsinghua.edu.cn/debian bookworm/main amd64 Packages
Description: replacement for make
 SCons is a make replacement providing a range of enhanced features such
 as automated dependency generation and built in compilation cache
 support.  SCons rule sets are Python scripts so as well as the features
 it provides itself SCons allows you to use the full power of Python
 to control compilation.

/home/user# apt install cmake
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
将会同时安装下列软件:
  cmake-data libjsoncpp25 librhash0 libuv1
建议安装:
  cmake-doc cmake-format elpa-cmake-mode ninja-build
下列【新】软件包将被安装:
  cmake cmake-data libjsoncpp25 librhash0 libuv1
升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 11.1 MB 的归档。
解压缩后会消耗 41.1 MB 的额外空间。
您希望继续执行吗? [Y/n] 
n

有时还得再装extra-cmake-modules呢,这个倒是小:需要下载198 kB,解压后会消耗841 kB.

# apt install meson
将会同时安装下列软件:ninja-build
下列【新】软件包将被安装:meson ninja-build
需要下载 683 kB 的归档。
解压缩后会消耗 3,968 kB 的额外空间。

Ninja joins a sea of other build systems. Its distinguishing goal is to be fast. It is born from the Chromium browser project, which has over 30,000 source files and whose other build systems can take ten seconds to start building after changing one file. Ninja is under a second. 

Ninja文件应通过其他程序(如CMake, Meson)生成,呵呵。cc -c a.cc; cc *.o岂不更快?

posted @ 2025-11-04 19:39  华容道专家  阅读(9)  评论(0)    收藏  举报