0
votes
  • When creating the solution (by solution I mean the creation of the .sln for Visual Studio) for VS2012 , I installed the Cmake.exe, I checkout the code into c:\tortoise6 folder and I run Cmake like as recommended -> a sln file was created
  • Before building the solution I commited the solution to the repository.
  • I created many folders in local like for example c:\tortoise7 where I checkout the code and built the solution properly.
  • Doing it manually with the msbuild command , the built seems going on (excepted at the end where I got problems with the dependencies with others libs used, for the moment it's not important)

Now:: - Running msbuild or launching the solution via Visual Studio automatically,a WIN32 folder and a ZERO_CHECK folder are created and inside we have the file ...\Win32\Debug\ZERO_CHECK\custombuild.command.1.tlog with the wrong lines: setlocal "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -HC:/tortoise6/c-interface -BC:/tortoise6/c-interface/build-VS2012 --check-stamp-list CMakeFiles/generate.stamp.list --vs-solution-file "d:\PortFolioCalculator\BuildAgent\work\7f2ffd93194f947d\c-interface\build-VS2012\rain.sln"

  • Obvously the next test was removing the original c:\tortoise6 folder in local and we get the errors building manually and via Visual Studio as well. Here a short piece of the error message : "1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(944,5): error MSB3191: Unable to create directory "C:\tortoise6\c-interface\build-VS2012\CMakeFiles\". Access to the path 'C:\tortoise6\c-interface\build-VS2012\CMakeFiles\' is denied. 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(944,5): error MSB3191: Unable to create directory "C:\tortoise6\c-interface\build-VS2012\external\boost\CMakeFiles\". Access to the path 'C:\tortoise6\c-interface\build-VS2012\external\boost\CMakeFiles\' is denied."

I found a short description of the ZERO_CHECK folder: ZERO_CHECK This is a rather oddly named project. It’s purpose is to make sure that the Visual Studio solution and its projects are all up to date. If you modify the CMakeLists.txt this project will update your Visual Studio solution. All other projects depend on this one so you don’t have to build it manually. Unfortunately when the solution and projects are updated by this Visual Studio will, for each one updated, ask you if you want to reload it, which can get a bit annoying.

I am wondering many questions: - if it does not have to be built manually, how could I avoid to build it? The command msbuild is trying to build the .sln file, even if I could avoid to build it teamcity will try anyway.

  • Why is this folder so important that is being created automatically even if I the build is manually.
  • In which moment of the process of the creation of the solution, the local path (c:\tortoise6..) has been copied and by what it should be replaced then?

Thank you.

1

1 Answers

0
votes

I found the solution, the responsible of this behaviour is the cmake which is always trying to compare the contenue of the cmakelist.txt of the new project and the original project. If we delete the first project it's going to produce an error.

We must run a new cmake always to avoid this behaviour, in others words we must use the cmake to create a a new solution for each project we checkout from the repository