安装下载安装cmake
直接到官方网站下载安装包并直接安装。
环境配置
安装完成后,打开cmake,点击菜单栏的Tools -> How to Install For Command Line Use,可以看到如下界面:
直接在终端执行
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
可以看到以下输出就代表已配置完成
Linked: '/usr/local/bin/cmake' -> '/Applications/CMake.app/Contents/bin/cmake'
Linked: '/usr/local/bin/ctest' -> '/Applications/CMake.app/Contents/bin/ctest'
Linked: '/usr/local/bin/cpack' -> '/Applications/CMake.app/Contents/bin/cpack'
Linked: '/usr/local/bin/cmake-gui' -> '/Applications/CMake.app/Contents/bin/cmake-gui'
Linked: '/usr/local/bin/ccmake' -> '/Applications/CMake.app/Contents/bin/ccmake'
验证安装
cmake --version
#输出 已安装完成
cmake version 3.23.0-rc4
评论区