[cmake-developers] [CMake 0011584]: Temporary files overlap in VS2010 generator

Mantis Bug Tracker mantis at public.kitware.com
Wed Dec 8 12:31:01 EST 2010


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=11584 
====================================================================== 
Reported By:                Petr Petrov
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   11584
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   urgent
Status:                     new
====================================================================== 
Date Submitted:             2010-12-08 12:31 EST
Last Modified:              2010-12-08 12:31 EST
====================================================================== 
Summary:                    Temporary files overlap in VS2010 generator
Description: 
I have a big project which works fine with CMake on VS2005, VS2008 and Unix
generators. It consists more than 100 executables & dynamic link libraries.

It contains a lot of small examples,
such as ADD_EXECUTABLE(Example1 main.cpp).

In VS2010 I have the following error in the different small examples, such as:

  CMake does not need to re-run because
D:\ProjectName\examples\ReportExample\CMakeFiles\generate.stamp is up-to-date.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018: The "CustomBuild" task failed unexpectedly.
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018: System.IO.IOException: The process cannot access the file
'C:\Users\petr\AppData\Local\Temp\7bf85b669bd34561b56a1267d38c2645.cmd' because
it is being used by another process.
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) [d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at System.IO.File.Delete(String path)
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at Microsoft.Build.Utilities.ToolTask.Execute()
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.Execute()
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5):
error MSB4018:    at
Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost
taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost,
ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
[d:\ProjectName\examples\ReportExample\ReportExample.vcxproj]

Please note that I am using /m:1 switch for msbuild.exe utility,
so, I am using 1 core for building this project.

I think that previous or some other project (as part of my big project) used the
temporary cmd file (i.e. Temp\7bf85b669bd34561b56a1267d38c2645.cmd) for
compiling and the current project is trying to use the exactly same name.

Is any work-around for this problem?

Steps to Reproduce: 
I can not figure-out a small example to reproduce, sorry
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-08 12:31 Petr Petrov    New Issue                                    
======================================================================




More information about the cmake-developers mailing list