-2

My clone project path from github "C:\Users\Addy\Documents\polaris\"

I have created build directory "C:\Users\Addy\Documents\polaris\build"

From cmd.exe I access build directory path "C:\Users\Addy\Documents\polaris\build"

And run this command

"cmake -G "Visual Studio 10 Win64" -DCMAKE_CONFIGURATION_TYPES=Release;Debug .."

I am running this command on windows7 cmd. But it gives me the error.

**'cmake' is not recognised as an internal or external command**

As per the steps given in the website(https://github.com/anl-polaris/polaris/wiki/Getting-Started)

  • 3
    Add the cmake path to the environment variables. – Ph03n1x Jul 31 '17 at 14:58
  • how? could i add a path. – Asad Abbas Jul 31 '17 at 15:00
  • 2
    You first have to download and isntall cmake. Normally then you have a folder something like "CmakeFolder/bin" in which you find the cmake.exe Now go and add this "CmakeFolder/bin" to your environmental variables. You can add paths as described here: https://www.computerhope.com/issues/ch000549.htm You find the whole process in this video: https://www.youtube.com/watch?v=tETup8cmqto – Ph03n1x Jul 31 '17 at 15:03
  • You've deleted your error message making your question a little confusing. – Treebeard Jul 31 '17 at 15:15
  • its on the titile, I did the same in the video. Still the same error. My clone is on this path "C:\Users\Addy\Documents\polaris\" and i have created build directory in clone path "C:\Users\Addy\Documents\polaris\build" From cmd.exe I access the path "C:\Users\Addy\Documents\polaris\build" and run this command "cmake -G "Visual Studio 10 Win64" -DCMAKE_CONFIGURATION_TYPES=Release;Debug .." (am i doing it correctly? what should i suppose to do now) – Asad Abbas Jul 31 '17 at 15:25
  • I have changed and exactly the situation please tell me what to do now it is still giving me the same error – Asad Abbas Jul 31 '17 at 15:36
  • After you change the PATH environment variable you need to start a new explorer instance to get your cmd.exe to use the new environment. I would just reboot or logout to do that. – drescherjm Jul 31 '17 at 15:55
  • Yes, I did but it dosen't work either, so i did that with cmake gui – Asad Abbas Aug 01 '17 at 13:21
  • Did you verify that cmake is in your windows system path. type set path from a cmd.exe window and look for CMake in the path. You may want to copy the text from the command window to a text editor and search for CMake in the path. – drescherjm Aug 01 '17 at 21:37

1 Answers1

0

It sounds like you don't have cmake in your path variables. Simple test, type 'echo %PATH%' in the command prompt, this will list all paths your OS will look for the executable in. If you can't see a path to your cmake executable then you need to add it.

Control Panel >> System >> Advanced System settings (left side on windows 10), too bring up the 'System Properties' window. In this window select 'Environmental Variables' to bring up a new window, then scroll down to PATH and enter the path to cmake.exe, click OK and close all windows to secure new settings.

On some versions of Windows this operation requires a restart before it takes affect, others you just need to open a new command prompt. I would start my opening a new command prompt and reentering 'echo %PATH%' command, looking for the new cmake path, if it's not here then restart Windows.

Treebeard
  • 322
  • 1
  • 9