[CMake] [Insight-users] CMake 2.8.0 problem

John Drescher drescherjm at gmail.com
Sat Aug 21 09:16:51 EDT 2010


> I've tried to configure InsightToolkit-3.16.0 using CMake 2.8.0 and I'm
> using Visual c++ 2008 Express Edition. what I did, I just select source
> file(InsightToolkit-3.16.0) and binary file and  I've got the following
> message:
> Check for working C compiler: cl
>
> CMake Error: Remove failed on file: D:/ITK
> 18/vc2008/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe: System Error:
> Permission denied
>
> Check for working C compiler: cl -- broken
>
> CMake Error at C:/Program Files/CMake
> 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
>
> The C compiler "cl" is not able to compile a simple test program.
>
> It fails with the following output:
>
> Change Dir: D:/ITK 18/vc2008/CMakeFiles/CMakeTmp
>
> Run Build Command:C:\PROGRA~1\MICROS~1.0\Common7\IDE\VCExpress.exe
>
> CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
>
> Microsoft (R) Visual C++ Express Edition Version 9.0.30729.1.
>
> Copyright (C) Microsoft Corp 2007. All rights reserved.
>
> ------ Build started: Project: cmTryCompileExec, Configuration: Debug Win32
>
> ------
>
> Compiling...
>
> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
>
> 80x86
>
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\"" /D
>
> "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\" /Fd"D:/ITK
>
> 18/vc2008/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.pdb" /W3 /c /Zi /TC
>
> /Zm1000
>
> ".\testCCompiler.c"
>
> testCCompiler.c
>
> Compiling manifest to resources...
>
> Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
>
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Linking...
>
> LINK : fatal error LNK1105: cannot close file 'D:\ITK
>
> 18\vc2008\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe'
>
> Build log was saved at "file://d:\ITK
>
> 18\vc2008\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"
>
> cmTryCompileExec - 1 error(s), 0 warning(s)
>
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
>
> ==========
>
> CMake will not be able to correctly generate this project.
>
> Call Stack (most recent call first):
>
> CMakeLists.txt:8 (PROJECT)
>
> Configuring incomplete, errors occurred!
>
> I hope to solve this problem, Thanks in advance.
>

I would first upgrade to cmake-2.8.2. There were a few bugs in 2.8.0
that were fixed months ago with 2.8.2. After that I would check if you
have write permissions on d:\itk. But wait a minute, did you set the
build folder to be d:\Itk with the source to be the same location. Its
much better to not have the build folder and source folder on the same
tree. So for example if your source is in D:\ITK put your build tree
in d:\Build\ITK

John


More information about the CMake mailing list