[CMake] Problem with NMake makefiles generator
Bill Hoffman
bill.hoffman at kitware.com
Fri Jan 26 10:42:43 EST 2007
Ilya Shvetsov wrote:
> Hi cmake team.
> I am tring to use Nmake generator for my project. But generation
> process fails.
> I use cmake 2.4.6 on Windows XP
>
>
> Here are error log:
> ...\src\engine\cmake\nmake>cmake -G"NMake Makefiles" ..\..
> -- Check for CL compiler version
> -- Check for CL compiler version - 1400
> -- Check if this is a free VC compiler
> -- Check if this is a free VC compiler - yes
> -- Check CL platform
> -- Check CL platform - 64 bit
> -- Check for working C compiler: cl
> -- Check for working C compiler: cl -- broken
> CMake Error: Error in cmake code at
> H:/DevTools/BuildSys/CMake/share/CMake/Modules/CMakeTestCCompiler.cmake:33:
>
> MESSAGE The C compiler "cl" is not able to compile a simple test program.
> It fails with the following output:
> H:\DevTools\MSVC8\VC\bin\nmake.exe -f
> CMakeFiles\cmTryCompileExec.dir/build.make /nologo -L
> CMakeFil
> es\cmTryCompileExec.dir\build
> H:\DevTools\BuildSys\CMake\bin\cmake.exe -E cmake_progress_report
> ...\src\engine\cmake\nma
> ke\CMakeFiles\CMakeTmp\CMakeFiles 1
> Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.obj
> H:\DevTools\MSVC8\VC\bin\cl.exe @H:\Temp\nm6C9.tmp
> testCCompiler.c
> ...\src\engine\cmake\nmake\CMakeFiles\CMakeTmp\testCCompiler.c(4) :
> fatal error C1034: stdio.h: no
> include path set
> NMAKE : fatal error U1077: 'H:\DevTools\MSVC8\VC\bin\cl.exe' : return
> code '0x2'
> Stop.
> NMAKE : fatal error U1077: 'H:\DevTools\MSVC8\VC\bin\nmake.exe' :
> return code '0x2'
> Stop.
>
>
> CMake will not be able to correctly generate this project.
> Current CMake stack:
> .../src/engine/CMakeLists.txt;H:/DevTools/BuildSys/CMake/share/CMake/Modules/
>
> CMakeCInformation.cmake;H:/DevTools/BuildSys/CMake/share/CMake/Modules/Platform/Windows-cl.cmake;I:/Projects/Engine/1C/RK/tru
>
> nk/src/engine/cmake/nmake/CMakeFiles/CMakeCPlatform.cmake;H:/DevTools/BuildSys/CMake/share/CMake/Modules/CMakeTestCCompiler.c
>
> make
> -- Configuring done
>
This sounds like VS Express. Make sure you install it correctly and set
all the PATHS up correctly. The NMake generator will only work from a
shell that has the environment setup correctly. (For example running
vcvars32.bat )
-Bill
More information about the CMake
mailing list