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

相关推荐
2501_927539301 天前
Final Cut Pro X fcpx音视频剪辑编辑(Mac中文)
macos·fcpx·mac·视频剪辑
澄澈i2 天前
CMake学习篇[2]---CMake进阶+非同级目录构建+静态库/动态库链接
c++·学习·cmake
usabcd22 天前
如何重新编译HyperLPR原生库以消除16k对齐警告
android·c++·cmake·ndk·mnn·16k对齐·hyperlpr
Winter_Sun灬2 天前
MacOS安装brew失败,无法访问github,怎么处理
macos·github·brew
慧都小项3 天前
Parasoft C/C++test 针对 CMake 项目的自动化测试配置
自动化测试·cmake·parasoft
悄然林静10 天前
Mac终端执行`brew doctor`报`openssl@1.1`警告
mac·xcode·apple
M-finder13 天前
Mac菜单栏综合工具FancyTool更新啦
mac·swift
羑悻的小杀马特14 天前
CMake 全流程开发实战:从零开始掌握C++项目构建、测试到一键分发的完整解决方案
c++·cmake
Yisitelz15 天前
签名、杂凑、MAC、HMAC
mac·密码·数据完整性·密评
2501_9275393015 天前
PDF Reader 编辑阅读(Mac)
pdf·mac·pdf reader