macOS - 安装 GNU make、cmake

文章目录


关于 cmake


使用 brew 安装



shell 复制代码
brew install make 

将安装在 /usr/local/Cellar/cmake/ 下,并链接至 /usr/local/bin


/usr/local/Cellar/cmake/3.23.2/bin 下有以下四个可执行文件

  • ccmake
  • cmake
  • cpack
  • ctest

查看版本信息

shell 复制代码
cmake --version

得到如下返回

shell 复制代码
cmake version 3.23.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

关于 GNU make


方式一:brew

可见 brew 官方文档:https://formulae.brew.sh/formula/make

brew install make

安装包将位于 /usr/local/Cellar/make,可执行文件为 /usr/local/Cellar/make/4.3/bin/gmake,被链接到 /usr/local/bin/gmake


获取版本信息:

shell 复制代码
gmake --version

shell 复制代码
GNU Make 4.3
Built for x86_64-apple-darwin21.1.0
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

方式二:下载源码


这里我下载:make-4.3.tar.gz

得到压缩包,解压后,进入文件夹,执行如下命令:

./configure
make 
sudo make install

既可得到可执行文件: /usr/local/bin/make


查看版本信息:

shell 复制代码
/usr/local/bin/make --version

得到

shell 复制代码
GNU Make 4.3
为 x86_64-apple-darwin22.5.0 编译
Copyright (C) 1988-2020 Free Software Foundation, Inc.
许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<http://gnu.org/licenses/gpl.html>。
本软件是自由软件:您可以自由修改和重新发布它。
在法律允许的范围内没有其他保证

伊织 2023-08-14

相关推荐
一根烂笔头5 小时前
Mac M3/M4 本地部署Deepseek并集成vscode
vscode·ai·mac·deepseek·m4
wzhao1016 小时前
elf_loader:一个使用Rust编写的ELF加载器
linux·rust·gnu
SummerGao.2 天前
Windows 快速搭建C++开发环境,安装C++、CMake、QT、Visual Studio、Setup Factory
c++·windows·qt·cmake·visual studio·setup factory
十秒耿直拆包选手4 天前
cmake:定位Qt的ui文件
c++·qt·ui·cmake
CLCNboss5 天前
MacOS配置Homebrew
mac
木兰不吃草5 天前
如何在 Mac 上下载安装仙剑游戏仙剑世界?可以通过IPA砸壳包安装非常简单
游戏·macos·ios·游戏程序·mac
小墙程序员5 天前
Android NDK(三)Cmake
android·cmake
我只会写Bug啊12 天前
只需三步!5分钟本地部署deep seek——MAC环境
大模型·mac·deep seek
Dolphin_Home14 天前
使用 CMake 自动管理 C/C++ 项目
c语言·c++·cmake
凡许真17 天前
Kafka的安装及相关操作命令
kafka·mac·操作命令·0.10.2.1·单机版