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

相关推荐
梓䈑9 小时前
【CMake】cmake的3大核心:目标、属性 和 API(含大量重点函数解析)
c++·cmake
zhensherlock9 小时前
Protocol Launcher 系列:Pika 取色器的协议控制(上篇)
前端·javascript·macos·typescript·github·mac·view design
钱多多_qdd1 天前
mac上安装claude
ai·mac
非鱼䲆鱻䲜4 天前
vscode开发stm32添加新的头文件路径和包含源文件
ide·vscode·stm32·cmake·包含头文件·包含源文件
zhensherlock4 天前
Protocol Launcher 系列:App Store 精准引流与应用推广
javascript·macos·ios·typescript·iphone·mac·ipad
特立独行的猫a5 天前
CMake与GN构建系统对比及GN使用指南
harmonyos·cmake·openharmony·构建·gn
特立独行的猫a5 天前
海思WS63平台CMake构建系统使用指南
cmake·海思·ws63·fbb_ws63
阿拉斯攀登6 天前
【RK3576 安卓 JNI/NDK 系列 05】NDK 构建系统:CMakeLists.txt 从入门到精通
cmake·rk3568·瑞芯微·rk安卓驱动·安卓jni·ndk构建系统
RisunJan6 天前
Linux命令-make(GNU的工程化编译工具)
linux·运维·gnu
茉莉玫瑰花茶6 天前
CMake 工程指南 - 工程场景(4)
服务器·c++·cmake