如何将CLion自定义CMake可执行文件设置为随Homebrew安装的版本? [英] How to set CLion custom CMake executable to a version installed with Homebrew?

查看:214
本文介绍了如何将CLion自定义CMake可执行文件设置为随Homebrew安装的版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让CLion使用与从命令行使用的相同版本的CMake。在首选项>构建,执行,部署>工具链中,我尝试将自定义CMake可执行文件路径设置为/usr/local/Cellar/cmake/3.7.0/bin,但是CMake在同一页面上显示未找到错误。 / p>

到目前为止,我已经brew安装了CLion使用的相同版本的CMake: brew switch cmake 3.6.2



但是有没有一种方法可以使CLion使用brew附带的cmake版本?

解决方案

是的,您可以设置自己的 cmake 二进制文件以在Clion中使用。



您在正确的轨道上,请转到首选项>建立,执行,部署>工具链,就像您所做的一样,并设置 CMake executabl->自定义

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

注意,您应该在此处输入您自己的cmake的绝对名称,而不仅仅是路径包含 cmake 的目录。


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?

解决方案

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.

这篇关于如何将CLion自定义CMake可执行文件设置为随Homebrew安装的版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆