I am getting the following error
Working on: Microsoft Windows [Versión 6.1.7601]
ErrorS:
CMake Warning at CMakeLists.txt:4 (project):
To u
Try to use "Visual Studio Command Prompt" (vcvarsall.bat)
I ran into the same problem. I realized that cl does not come with Visual Studio 2015, but when I installed the 2013 express, it worked.
Use the "Visual Studio 2013" -> "Visual Studio Tools" -> "VS2013 x64 Cross Tools Command Prompt".
Please note that I resolved the problem by adding this to my PATH environment variable where I have Visual Studio 2019 installed:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64
As others said you can either run cmake in "Visual Studio Command Prompt" form the path @Miles said or (better way) add the path of visual studio compiler to your path. Check this path:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
and find it in your computer, then add it in your PATH environment variable.
You need to run the batch script provided by Visual Studio to set up your environment before running cmake. It's under X:\Visual\Studio\Dir\VC\vcvarsall.bat
. There should also be a shortcut in the start menu for "Visual Studio Command Prompt" that will open a prompt and automatically run vcvarsall.bat
.