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

相关推荐
张世争14 小时前
windows clion MingW cmake 编译运行 FreeRTOS
windows·freertos·mingw·cmake·clion
这就是佬们吗1 天前
告别 Node.js 版本冲突:NVM 安装与使用全攻略
java·linux·前端·windows·node.js·mac·web
软件小滔2 天前
拖拽出来的专业感
经验分享·macos·mac·应用推荐
十五年专注C++开发2 天前
CMake进阶:核心命令get_filename_component 完全详解
开发语言·c++·cmake·跨平台编译
PieroPc3 天前
Windows 远程到 PVE 9.X Mac os (像window远程桌面)
windows·mac·远程桌面
阿巴~阿巴~3 天前
从帧到包:深入解析链路层与局域网通信的核心机制
服务器·网络·网络协议·tcp/ip·智能路由器·mac·数据链路层
麻辣长颈鹿Sir4 天前
CMAKE指令集
linux·运维·windows·cmake·cmake指令集
lunatic75 天前
CMake 常用内置变量说明
c++·cmake
ALex_zry6 天前
CMake变量传递与宏定义技术详解:从问题到解决方案
开发语言·spring·cmake·条件编译
Ceelog7 天前
MemoryBubble(内存泡泡) 戳泡泡清理 Mac 内存
macos·mac