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

Bill Hoffman bill.hoffman at kitware.com
Sun Dec 16 09:48:43 EST 2007


Cem DEMiRKIR wrote:
> Hello  CMake users & developers, 
> 
> I've been trying to build ITK on my machine, and obviously is not 
> related to what is built, and CMake produces 
> some errors at the configuration step.  Perhaps someoneelse 
> has already encountered 
> similar type of problem ?
> 
> My setup:
> Windows XP, ITK 3.4.0 Latest Release, CMake 2.4.7, Visual Studio .NET 2005
> w/ Visual C++ 8
> 
> At first I've observed the following CMake Errror message box and then a 
> lot of errors coming up when I choose OK.
> 
> CMake Error:  Unable to find executable for TRY_RUN:  tried
> "Z:\Libraries\Insight\bin/CMakeTmp/cmTryCompileExec.exe" and
> "Z:\Libraries\Insight\bin/CMakeTmp/Debug/cmTryCompileExec.exe" and
> "Z:\Libraries\Insight\bin/CMakeTmp/Development/cmTryCompileExec.exe".
> [CMake is correct; these files do not exist, but the log indicates no 
> error for the building of these executables.]
>  
> In order to debug the error I've created an empty foo.c like the following
> 
> #include <stdio.h>
> 
> void main(void)
> 
> {
> 
> }
> 
> and a CMakeLists.txt 
> 
> add_library(foo foo.c).
> 
> I put them into the "C:\CMakeTest" 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" CMake still produces 
> CMake error.
> 
> I've compiled previous version of ITK, or VTK, etc. without any problem 
> before, but after deleting old one and trying to build the latest 
> release, I've got these errors. I'd be grateful to anyone who help me 
> resolve this problem ?
>  
I can help, but you are going to have to do some work...  :)

You are going to need to debug CMake with a debugger or with print 
statements but you need cmake to build cmake.  Maybe you can build with 
the nmake generator on this machine.  Try the simple test case with the 
nmake makefiles generator.  You will need to run cmake from the visual 
studio command line tools prompt.   If that works, then get the source 
for cmake and build it with debug on.  Then we can try and figure out 
why cmake can not tell that file exists.

-Bill


More information about the CMake mailing list