Hello fellow cmakers, I've encountered a weired bug: Given that CMake is installed in C:/Programme/CMake and MATLAB's bin folder is on the path before cygwin's, cmake fails on
{{{ cmake_minimum_required(VERSION 2.6) project(Foo C) }}} with {{{ mkdir Debug cd Debug && cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ../ -- The C compiler identification is MSVC -- Check for CL compiler version -- Check for CL compiler version - 1500 -- Check if this is a free VC compiler -- Check if this is a free VC compiler - no -- Check CL platform -- Check CL platform - 32 bit -- Check for working C compiler: C:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- Check for working C compiler: C:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe -- broken -- Configuring incomplete, errors occurred! CMake Error at C:/Programme/CMake/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE): The C compiler "C:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: V:/workspace/test_C/Debug/CMakeFiles/CMakeTmp Run Build Command:C:/Programme/MATLAB/R2008a/bin/win32/gmake.exe "cmTryCompileExec/fast" gmake.exe[1]: Entering directory `V:/workspace/test_C/Debug/CMakeFiles/CMakeTmp' C:/Programme/MATLAB/R2008a/bin/win32/gmake.exe -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build gmake.exe[2]: Entering directory `V:/workspace/test_C/Debug/CMakeFiles/CMakeTmp' C:/Programme/CMake/bin/cmake.exe -E cmake_progress_report V:/workspace/test_C/Debug/CMakeFiles/CMakeTmp/CMakeFiles 1 [32mBuilding [0m[32mC [0m[32mobject [0m[32mCMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj [0m"C:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe" /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FoCMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj /FdV:/workspace/test_C/Debug/CMakeFiles/CMakeTmp/cmTryCompileExec.pdb -c V:/workspace/test_C/Debug/CMakeFiles/CMakeTmp/testCCompiler.c testCCompiler.c [31m[1mLinking [0m[31m[1mC [0m[31m[1mexecutable [0m[31m[1mcmTryCompileExec.exe [0mC:/Programme/CMake/bin/cmake.exe -E vs_link_exe "C:/Programme/Microsoft Visual Studio 9.0/VC/bin/cl.exe" /nologo @CMakeFiles/cmTryCompileExec.dir/objects1.rsp /DWIN32 /D_WINDOWS /W3 /Zm1000 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FecmTryCompileExec.exe /FdV:/workspace/test_C/Debug/CMakeFiles/CMakeTmp/cmTryCompileExec.pdb -link /implib:cmTryCompileExec.lib /version:0.0 /MANIFEST /STACK:10000000 /machine:I386 /debug /INCREMENTAL:YES /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib Das System kann die angegebene Datei nicht finden cmTryCompileExec.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. Das System kann die angegebene Datei nicht finden. }}} It fixed by either: 1. Let CMake use cygwin's make: - In cygwin's bin folder copy make.exe to gmake.exe and place it at the beginning of PATH - Setting CMAKE_MAKE_PROGRAM to cygwin's make 2. Let CMake use MATLAB's gmake, but - The install location has an space in it (like C:/Programme/CMake 2.6/) - The environment variable MAKE is set to "make" (set MAKE=make) While the 1. solutions reasonable to me, I have no idea why 2. fixes the problem as well. Its just weired. I observed that in case it works CMakeFiles/CMakeCCompiler.cmake is there, but missing for the failing one. What bugs me most is the inconsistency for the failings. Why doesn't it work if the installation path has a space in it... Hints Anyone? Best, -- Maik _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake