How to set CLion custom CMake executable to a version installed with Homebrew?

陌路散爱 提交于 2019-12-20 03:05:15

问题


I'm trying to make CLion use the same version of CMake that I'm using from the command line. In Preferences > Build, Execution, Deployment > Toolchains, I tried setting a custom CMake executable path to /usr/local/Cellar/cmake/3.7.0/bin, but CMake displays a "not found" error on the same page.

For now, I had brew install the same version of CMake that CLion is using: brew switch cmake 3.6.2

But is there a way to make CLion use the version of cmake installed with brew?


回答1:


Yes, you can set your own cmake binary for use in Clion.

You're on the right track, go to Preferences > Build, Execution, Deployment > Toolchains just as you did, and set CMake executabl -> Custom to

 /usr/local/Cellar/cmake/3.7.0/bin/cmake

Note, your're supposed to put the absolute name of your own cmake here, not only the path to the directory containing cmake.



来源:https://stackoverflow.com/questions/40900094/how-to-set-clion-custom-cmake-executable-to-a-version-installed-with-homebrew

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!