问题
解决
可能 1:未安装 cmake
测试:cmake --version
结果:-bash: cmake: command not found
解决:brew install cmake
可能 2:未添加环境变量
-
打开home 目录下的.bash_profile:
vim .bash_profile
-
添加以下代码 :
# Add Cmake Root to Path export CMAKE_ROOT=/Applications/CMake.app/Contents/bin/ export PATH=$CMAKE_ROOT:$PATH
-
使之立即生效:
source .bash_profile