[CMake] Setting up CMake for Windows projects

John Drescher drescherjm at gmail.com
Mon Nov 8 16:09:22 EST 2010


On Mon, Nov 8, 2010 at 4:09 PM, Stormwind Developer
<stormwind.dev at googlemail.com> wrote:
> Greetings,
>
> I am a complete beginner to CMake, so my problem might be trivial.
> Nevertheless I did not find a solution yet.
>
> I am running Windows XP in a virtual machine on a linux host system. Having
> CMake 2.6.4 installed I tried to run CMakeLists.txt from a project I
> downloaded.
>
> My problem is, that CMake fails with message logs like this one:
> Check for working C compiler: E:/Programme/Microsoft Visual Studio
> 10.0/VC/bin/cl.exe
> Check for working C compiler: E:/Programme/Microsoft Visual Studio
> 10.0/VC/bin/cl.exe -- broken
> CMake Error at E:/Programme/CMake
> 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):
>   The C compiler "E:/Programme/Microsoft Visual Studio 10.0/VC/bin/cl.exe"
> is
>   not able to compile a simple test program.
>
>   It fails with the following output:
>
>    Change Dir: F:/bin/mygui/CMakeFiles/CMakeTmp
>
>
>
>   Run Build Command:E:\PROGRA~1\CMAKE2~1.6\bin\cmake.exe
>   CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
>
>
>
>
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:12 (project)
>
>
> Configuring incomplete, errors occurred!
>
> I use Visual Studio 2010 for my project, so I specified the path to cl.exe
> as shown in the log. As value for CMAKE_MAKE_PROGRAM I used the path to
> cmake.exe
>
> Can anybody explain to me how to understand the log? Of course I checked all
> paths and F:/bin/mygui/CMakeFiles/CMakeTmp does exist. I don't know how to
> continue.
>
> Regards
>
> Michael
>

You need to use CMake 2.8.X with Visual Studio 2010.

John


More information about the CMake mailing list