[CMake] file INSTALL cannot set modification time on

Eric Clark eclark at ara.com
Thu May 1 12:32:08 EDT 2014


Hello,

I have a few Visual Studio projects that I set a post-build event in Visual Studio to copy the DLLs, LIBs and a few other files up into a directory used for development. I do this by running the following custom command:

add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND
                                                 ${CMAKE_COMMAND} -D "BUILD_TYPE:STRING=\$(Configuration)"
                                                 -D "CMAKE_INSTALL_LOCAL_ONLY:STRING=TRUE"
                                                 -D "CMAKE_INSTALL_PREFIX:STRING=${ARA_DIR}"
                                                 -D "COMPONENT:STRING=development"
                                                 -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" VERBATIM)

I can guarantee you that all of the paths are correct and that this used to work no problem. Now, every now and then I get the following error:

12>PostBuildEvent:
12>  -- Install configuration: "Debug"
12>  -- Install component: "development"
12>  -- Installing: C:/projects/AraFramework/bin/AraOpenGLd.dll
12>  CMake Error at cmake_install.cmake:64 (FILE):
12>    file INSTALL cannot set modification time on
12>    "C:/projects/AraFramework/bin/AraOpenGLd.dll"
12>
12>
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: The command "setlocal
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: C:\projects\CMake\2.8\bin\cmake.exe -D BUILD_TYPE:STRING
=Debug -D CMAKE_INSTALL_LOCAL_ONLY:STRING=TRUE -D CMAKE_INSTALL_PREFIX:STRING=C:
/projects/AraFramework -D COMPONENT:STRING=development -P C:/projects/AraFramewo
rk/src/vc10-build/AraOpenGL/cmake_install.cmake
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: :cmEnd
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDon
e
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: :cmErrorLevel
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: exit /b %1
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: :cmDone
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
12>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
(113,5): error MSB3073: :VCEnd" exited with code 1.
12>
12>Build FAILED.

This is on a specific project, but it is not always the same project and it happens very randomly. If I build the solution multiple times, it will eventually make it through everything, but I always have to build the solution multiple times. Does anyone know why this would be happening and if there is something I could do to prevent it?

Thank You,
Eric

I am a fortunate man. Whenever I make a mistake, other people are sure to notice it. -- The Analects, Confucius
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140501/ec67831e/attachment.html>


More information about the CMake mailing list