Nic
Nic

Reputation: 437

CMake command is not recognized

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?

Upvotes: 9

Views: 68622

Answers (4)

Vincent Berthiaume
Vincent Berthiaume

Reputation: 87

You can install cmake with the built-in windows package manager winget by running this in a command line application:

winget install cmake

You'll need to restart your command line application or open another tab for cmake to be accessible after that.

Upvotes: 0

simplyPTA
simplyPTA

Reputation: 440

in case someone install the Windows C++ Build Tools / Visual Studio, check out this answer https://stackoverflow.com/a/69324180/10805680

Upvotes: 1

monkrus
monkrus

Reputation: 1680

Was able to resolve the issue by installing Chocolatey (on Windows 10) and running choco install cmake

Upvotes: 8

Nic
Nic

Reputation: 437

It resolved after adding C:\Program Files (x86)\CMake\bin to environment variable PATH.

Upvotes: 18

Related Questions