[Cmake] Cannot generate nmake build

William A. Hoffman billlist at nycap.rr.com
Thu, 04 Mar 2004 16:56:01 -0500


To use Visual Studio from the command line, you must set up quite a few
environment variables.    There is a .bat file that comes with visual studio.
vcvars32 that sets up the environment.   Compiling from the ide does not require
anything to be in your environment.   So, run vcvars32.bat in a shell, then
run CMakeSetup.exe from that shell and it should work.   You can also look
at vcvars32.bat and copy all the variables to the main system environment so
that you can just run CMakeSetup.   You would need this environment to use
nmake to do the build.   With Visual Studio 6 there is an option that shows
up at install time, that will allow cl to be used from the prompt.

Try to compile helloworld.cxx from the command line with cl, once you get
that working, cmake should work as well.

-Bill


At 04:18 PM 3/4/2004, Chris Scharver wrote:
>Hello,
>
>I'm trying to get an nmake build working since I'm tired of typing the long msdev command on the command line to compile the CMake-built Visual Studio project. CMake first complained that I didn't have the compiler in my path. That seems odd since I never needed it explicitly set in my path for Visual Studio builds.  I didn't have the compiler in my default path, but once I added it I then encountered a new error:
>
>The compiler 'cl' is not able to compile a simple test program.
>It fails with the following output:
> Building object file testCCompiler.obj...
>        cl  at C:\Temp\nma01360,
>NMAKE : fatal error U1077: 'cl' : return code '0x80'
>Stop.
>
>CMake will not be able to correctly generate this project.
>
>This seems to use my TMP environment variable. I tried deleting it, but it didn't do anything to resolve the error. Are there some other steps that I need to take in order to make sure that CMake can generate nmake files? Why would it have no problem generating Visual Studio 6 project files (they use the same compiler)? This is all with CMake 1.8-3 and Visual Studio 6 SP 5 on Windows 2000.
>
>Thanks,
>Chris
>
>--
>Chris Scharver
>Electronic Visualization Laboratory
>The University of Illinois at Chicago
>Ph: 312-996-3002   FAX: 312-413-7585
><http://www.evl.uic.edu/scharver/>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake