MantisBT - CMake
View Issue Details
0011598CMakeCMakepublic2010-12-11 08:432011-01-12 07:58
Petr Petrov 
Brad King 
normalmajoralways
closedfixed 
win32_x86Windows Vista6.0
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011598: Two 'ALL_BUILD' projects into generated solution
Hello!

I have just found that the latest Cmake from night build has a bug.
I have downloaded and installed the following version of the CMake:
http://www.cmake.org/files/dev/cmake-2.8.3.20101210-gb7ea1-win32-x86.zip [^]

I have tried to build my big project and it fails.
I have opened the generated solutions and see the following:
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "D:\build_area\ds\ds1_oem\build\ALL_BUILD.vcxproj", "{BE1796D4-BCB8-4EA0-89ED-BC4F61E950AF}"
    ProjectSection(ProjectDependencies) = postProject
        {0B60C193-A8B6-43D5-9D52-036B3923E6FC} = {0B60C193-A8B6-43D5-9D52-036B3923E6FC}
        {D557CA1C-0A66-4243-977D-1F5B4097613C} = {D557CA1C-0A66-4243-977D-1F5B4097613C}
        // Another dependencies
    EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "D:\build_area\ds\ds1_oem\build\unreleased_area\unrel_example1\ALL_BUILD.vcxproj", "{BE1796D4-BCB8-4EA0-89ED-BC4F61E950AF}"
    ProjectSection(ProjectDependencies) = postProject
        {F9F0A3B9-ECE8-4AC3-B49E-E971D7389D76} = {F9F0A3B9-ECE8-4AC3-B49E-E971D7389D76}
    EndProjectSection
EndProject

So, the generated solution has TWO 'ALL_BUILD' VC project entries!

msbuild or Microsoft Visual Studio IDE does not want to build such solution!
I have tried both VC2008 and VC2010 generators. All have the same result!

I can not share my big project.
But I have found that Cmake's sources produces also the same bad solution file.
So, you can reproduce this bug.

P.S.
Thanks to Brad King for fixing the following bug: http://public.kitware.com/Bug/view.php?id=11594 [^]
1) Download and install the latest Cmake from http://www.cmake.org/files/dev/cmake-2.8.3.20101210-gb7ea1-win32-x86.exe [^]
2) Download the sources of Cmake from http://www.cmake.org/files/dev/cmake-2.8.3.20101210-gb7ea1.zip [^]
3) Using cmake binaries from 1) generate solution and project files for VC2008 or VC2010 (I prefer VC2008 generator, it is much stable) for downloaded sources of the cmake from 2)
4) Open the generated solution into Microsoft Visual Studio 2008 IDE. It should show the error message that the solution file has two 'ALL_BUILD' project. It is possible to compile this project. But in batch mode (for VC2010 generator) it is impossible.
No tags attached.
related to 0010395closed Brad King cannot use add_dependencies() for imported libraries (together with externalproject_add()) 
Issue History
2010-12-11 08:43Petr PetrovNew Issue
2010-12-11 12:15Petr PetrovNote Added: 0023895
2010-12-11 12:19Petr PetrovNote Added: 0023896
2010-12-13 08:46Brad KingAssigned To => Brad King
2010-12-13 08:46Brad KingStatusnew => assigned
2010-12-13 08:52Brad KingNote Added: 0023921
2010-12-13 08:53Brad KingRelationship addedrelated to 0010395
2010-12-13 13:04Brad KingNote Added: 0023925
2010-12-13 13:04Brad KingStatusassigned => closed
2010-12-13 13:04Brad KingResolutionopen => fixed
2010-12-20 11:09Brad KingRelationship addedrelated to 0011633
2010-12-20 11:14Brad KingRelationship deletedrelated to 0011633
2011-01-12 07:58David ColeFixed in Version => CMake 2.8.4
2011-01-12 07:58David ColeTarget Version => CMake 2.8.4

Notes
(0023895)
Petr Petrov   
2010-12-11 12:15   
Please note that this bug does not affect in VS2005 generator
(0023896)
Petr Petrov   
2010-12-11 12:19   
Also I am worrying that bug-fix by Brad King (http://public.kitware.com/Bug/view.php?id=11594 [^]) could cause the current problem
(0023921)
Brad King   
2010-12-13 08:52   
Thanks for trying the development version.

I can reproduce this. It hasn't shown up in our nightly tests though because at least with the VS 2008 generator we can still build using "devenv" on the command line.

From "git bisect" I found that the bug was introduced a few weeks ago:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e01cce28#patch3 [^]

It is caused by a subtle interaction of the new feature added by that commit and the way the "INSTALL" target gets a dependency on "ALL_BUILD". It can occur in any project that has INSTALL rules and subdirectories with project() commands (which create their own solutions and their own ALL_BUILD).

I need to think about the proper fix because I can't just remove the new feature (from issue 0010395).
(0023925)
Brad King   
2010-12-13 13:04   
Fixed:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06213626 [^]