如何将 CLion 自定义 CMake 可执行文件设置为与 Homebrew 一起安装的版本?
How to set CLion custom CMake executable to a version installed with Homebrew?
我试图让 CLion 使用与我在命令行中使用的相同版本的 CMake。在 Preferences > Build, Execution, Deployment > Toolchains 中,我尝试将自定义 CMake 可执行文件路径设置为 /usr/local/Cellar/cmake/3.7.0/bin,但 CMake 在同一页面上显示 "not found" 错误。
现在,我让 brew 安装了 CLion 使用的相同版本的 CMake:brew switch cmake 3.6.2
但是有没有办法让 CLion 使用 brew 安装的 cmake 版本?
是的,您可以设置自己的 cmake
二进制文件以便在 Clion 中使用。
你走对了,像你一样转到Preferences > Build, Execution, Deployment > Toolchains
,然后将CMake executabl -> Custom
设置为
/usr/local/Cellar/cmake/3.7.0/bin/cmake
注意,你应该把你自己的 cmake 的绝对名称放在这里,而不仅仅是包含 cmake
.
的目录的路径
我试图让 CLion 使用与我在命令行中使用的相同版本的 CMake。在 Preferences > Build, Execution, Deployment > Toolchains 中,我尝试将自定义 CMake 可执行文件路径设置为 /usr/local/Cellar/cmake/3.7.0/bin,但 CMake 在同一页面上显示 "not found" 错误。
现在,我让 brew 安装了 CLion 使用的相同版本的 CMake:brew switch cmake 3.6.2
但是有没有办法让 CLion 使用 brew 安装的 cmake 版本?
是的,您可以设置自己的 cmake
二进制文件以便在 Clion 中使用。
你走对了,像你一样转到Preferences > Build, Execution, Deployment > Toolchains
,然后将CMake executabl -> Custom
设置为
/usr/local/Cellar/cmake/3.7.0/bin/cmake
注意,你应该把你自己的 cmake 的绝对名称放在这里,而不仅仅是包含 cmake
.