Skip to content

NMake configuration on Windows fails

Configuring a simple cmake project for NMake fails but interestingly configuring it for Visual Studio works. Here is the error log:

Determining if the C compiler works failed with the following output:
Change Dir: C:/Users/Cavit/Codes/ObserverPattern/build/CMakeFiles/CMakeTmp

Run Build Command:"nmake" "/NOLOGO" "cmTC_ec538\fast"
	"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTC_ec538.dir\build.make /nologo -L                  CMakeFiles\cmTC_ec538.dir\build

Building C object CMakeFiles/cmTC_ec538.dir/testCCompiler.c.obj

	C:\PROGRA~2\MICROS~1.0\VC\bin\cl.exe  @C:\Users\Cavit\AppData\Local\Temp\nm191C.tmp

testCCompiler.c

Linking C executable cmTC_ec538.exe

	"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_ec538.dir --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\link.exe /nologo @CMakeFiles\cmTC_ec538.dir\objects1.rsp @C:\Users\Cavit\AppData\Local\Temp\nm1A84.tmp

RC Pass 1 failed to run.

NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'

Stop.

I have tried to use different CMake versions, 3.7.2 and 3.8.1, they both gave the same results.

I am not sure if this problem related to CMake or NMake, or if am I doing some silly mistake, I would like to find out the problem.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information