无法识别CMake命令

问题描述:

我已经安装了CMake,而cmake.exe位于 C:\Program Files(x86)\CMake\bin
但是,当我运行通过bat文件调用cmake%CMAKE_BUILD_OPTIONS%我收到一条错误消息

I have installed CMake and cmake.exe is in C:\Program Files (x86)\CMake\bin But when I run call cmake %CMAKE_BUILD_OPTIONS% through a bat file I am getting an error message


' cmake'不被识别为内部或外部命令,可操作程序或批处理文件。

'cmake' is not recognized as an internal or external command, operable program or batch file.

我应该在环境变量中设置此路径吗?

Should I set this path in environment variable?

在添加 C:\Program Files(x86)\CMake\bin后解决到环境变量 PATH