1

The VS environment variable is set beforehand with vcvars32.bat, and VS is the only compiler that I use; the OS is win 7.

The error happens with cmake-gui; specifying the compiler with path results in error 'compiler failed to make simple test'; alternatively, cmake -i from command line succeeds initially with presenting an 'options' menu which then fails to allocate a 'cmakelists.txt' file (which is somewhere deeper in the cmake folder).

Where am I going wrong? (I continued with building the solution files from VS 12, but there's other issues.)

  • 1
    Are you run cmake and cmake-gui from "VS2012 Native Tools Command Prompt"? "Programs->Microsoft Visual Studio 2012->Visual Studio Tools"? – Sergei Nikulov Jan 02 '14 at 19:57
  • @Sergey I started cmake-gui as 'stand-alone', specified file path of source code and target folder for new build, and then for configuration NMAKE makefiles; tried VS 12 (for VS2013, I believe) to see if a compiler is recognised at all. Used VS2010 Command Prompt for setting environment path and trying cmake -i –  Jan 02 '14 at 20:32
  • 2
    Do not run cmake-gui as standalone. Run it from VS2012 Native Tools Command Prompt. This will help to generate nmake project. Will not work without "vcvars.bat" set. – Sergei Nikulov Jan 02 '14 at 20:37
  • @Sergey I see, think I'll either look at the CMakeFiles in more detail or probably try continue with the VS project files - many thanks for you help –  Jan 02 '14 at 21:27
  • @Sergey Realised the difference between just _starting_ cmake-gui from short-cut and from command prompt like you said, and re-tried - all good. You're a star –  Jan 03 '14 at 18:07

1 Answers1

1

The answer to your question from cmake mailing list

Run cmake-gui FROM the target environment, just like you run cmake...

i.e. : type "cmake-gui" in the cmd prompt that has your stuff set up in it. Don't just launch it from a short-cut unless you're using the "Visual Studio *" generators. Those do not need any special environment. Many of the makefile ones do.

Sergei Nikulov
  • 5,029
  • 23
  • 36