[CMake] What's happening to CMake ??? Please help !!!

Cem DEMiRKIR cdemirkir at gmail.com
Fri Dec 14 03:39:35 EST 2007


Hi Bill,
	I've created an empty foo.c like the following

#include <stdio.h>

void main(void)
{
 
}

and a CMakeLists.txt the same as you offered and I put them into the
"C:\CMakeTest" folder and made a folder "Bin" inside this folder.
I've changed my directory to the bin directory of CMake and run the
following command
from the command console

cmake C:\CMakeTest\CMakeLists.txt --debug-trycompile

It produced the following output lines
debug trycompile on
--Check for working C compiler: cl
--Check for working C compiler: cl --works
--Check size of void*
CMake Error: Unable to find executable for TRY_RUN: tried
"C:/CMakeTest/CMakeFiles/CMakeTmp/cmTryCompileExec.exe" and
"C:/CMakeTest/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe" and
"C:/CMakeTest/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe".
--Check size of void* -done
--Check for working CXX compiler: cl
--Check for working CXX compiler: cl --works
--Configuring done

I've check the availability of executables  
1. "C:/CMakeTest/CMakeFiles/CMakeTmp/cmTryCompileExec.exe" is not available
2. "C:/CMakeTest/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe" is
available
3. "C:/CMakeTest/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe" is
not available and the folder "Development" does not exist.

and the solution "CMAKE_TRY_COMPILE.sln" in the folder
"C:\CMakeTest\CMakeFiles\CMakeTmp" is available and it can be built without
any errors.

I don't understand Although cmTryCompileExec.exe is available inside the
folder "C:/CMakeTest/CMakeFiles/CMakeTmp/Debug" it still produces CMake
error.

	Regards
	Cem

-----Original Message-----
From: Bill Hoffman [mailto:bill.hoffman at kitware.com] 
Sent: Thursday, December 13, 2007 8:15 PM
To: Cem DEMiRKIR
Cc: 'David Cole'; 'CMake Mailing List'
Subject: Re: [CMake] What's happening to CMake ??? Please help !!!

Cem DEMiRKIR wrote:
> No, David, it still continues producing the same error as before. I've 
> changed the Bin directory to D:\Test and it still produces the error.
>  
>  

Run cmake from the command line with --debug-trycompile.  Then go into
CMakeTmp and look at the project that is created, and try to build it and
see why the files are not being created.

One odd thing, is this:
"Z:\Libraries\Insight\bin/CMakeTmp/cmTryCompileExec.exe

I would think that it should be looking in CMakeFiles/CMakeTmp.  Can you
give the exact commands you are running?  Also, a very good thing to try
would be a very simple cmake project.

Create a CMakeLists.txt file with this:
add_library(foo foo.c)

Also create an empty foo.c file.  Then run cmake on that.  Does it work?


-Bill



More information about the CMake mailing list