问题
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' is not recognized as an internal or external command, operable program or batch file.
Should I set this path in environment variable?
回答1:
It resolved after adding C:\Program Files (x86)\CMake\bin to environment variable PATH.
回答2:
Was able to resolve the issue by installing Chocolatey (on Windows 10) and running choco install cmake
来源:https://stackoverflow.com/questions/31675150/cmake-command-is-not-recognized