无法从OSX上的Eclipse访问命令行工具
我在macOS机器上使用Eclipse.CMake在我的计算机上位于/usr/local/bin/cmake
上,并已使用Homebrew安装.Eclipse是最新版本(2018-09).
I am using Eclipse on a macOS machine. CMake is present on my machine at /usr/local/bin/cmake
and has been installed using Homebrew. Eclipse is at the latest version (2018-09).
我在Makefile中具有以下目标,该目标已经设置并且可以从Eclipse中看到:
I have the following target in a Makefile, which has been set up and is visible from Eclipse:
all:
./configure
Rscript -e "Rcpp::compileAttributes()"
R CMD INSTALL --no-multiarch --with-keep.source .
在 configure
文件中,有以下代码:
Inside the configure
file, there is this code:
cd src/build;cmake ..
但是,当我双击Eclipse中的 all
目标时,会收到以下消息:
However, when I double click the all
target in Eclipse, I get the following message:
make all
./configure
./configure: line 1: cmake: command not found
make: *** [all] Error 127
我记得前一段时间这个目标在macOS上是开箱即用的.我也可以从终端启动CMake,没有任何麻烦.
I remember that some time ago this target worked out of the box on macOS. I can also launch CMake from a terminal without any trouble.
echo $ PATH
显示了不同的行为:
- 如果从标准macOS终端调用,它将产生
/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin
- 如果从Eclipse中的TM终端调用,它将产生
/usr/bin:/bin:/usr/sbin:/sbin
让Eclipse检测我的CMake安装的最典型方法是什么?
What is the most canonical way to have Eclipse detect my CMake installation ?
对于macOS High Sierra 10.13.6,该解决方案提供了此以查看立即更改.
For macOS High Sierra 10.13.6, the solution provided here works. This must be performed to see the changes immediately.