MantisBT - CMake
View Issue Details
0014897CMakeCMakepublic2014-04-24 12:042014-10-06 10:33
jwo 
 
normalminoralways
closednot fixable 
Visual Studio 2012Windows 7 64 Bit7
CMake 2.8.12.2 
 
0014897: Wrong reference of ZERO_CHECK.vcxproj if project is included with INCLUDE_EXTERNAL_MSPROJECT(...)
When including a project into another project with INCLUDE_EXTERNAL_MSPROJECT(...), the resulting solution cannot be built due to a reference to a non-existing project. Error-Message: "The project file ' ' has been renamed or is no longer part of the solution"

This only happens if the two projects (the included and the including) have been configured via CMake.

It does occur if using the generator for Visual Studio 2012, but not when generating for Visual Studio 2008.

The reason for the problem is the following.
Both project in the solution (the included and the including) refer to the project ZERO_CHECK (You can right-click the project, go to properties, then to Framework and References to see it). Unformtunately, the project IDs (called Identity in this view) ZERO_CHECK of differ between these two project. Project2 refers to the existing ZERO_CHECK, but Project1 refers to a non-existing.

1. Unzip the appended archive ReproduceBug.zip
2. call cmake_all_projects.bat to cmake the two projects
3. Open the second soultion (Sln2/project2.sln)
4. Build the solution
--> Error: "The project file ' ' has been renamed or is no longer part of the solution"

5. Right-click project1 and project2, go to properties, then to Framework and References and find the different references to ZERO_CHECK.
This bug is related but not a duplicate of bug 0014378 (http://www.cmake.org/Bug/view.php?id=0014378 [^])
Anyway, setting CMAKE_SUPPRESS_REGENERATION to TRUE suppresses the error by deactivating its cause. But for many users may not be a good workarround as the automatic regerneration of the projects is blocked.
Due to several reasons it is not possible to include the two projects in the same CMakeLists.txt or configure them in one call of CMake.
No tags attached.
related to 0014378closed Brad King ZERO_CHECK.vcxproj referenced despite CMAKE_SUPPRESS_REGENERATION set to FALSE 
zip ReproduceBug.zip (1,305) 2014-04-24 12:04
https://public.kitware.com/Bug/file/5137/ReproduceBug.zip
Issue History
2014-04-24 12:04jwoNew Issue
2014-04-24 12:04jwoFile Added: ReproduceBug.zip
2014-04-24 12:06jwoNote Added: 0035772
2014-04-24 13:26Brad KingRelationship addedrelated to 0014378
2014-04-24 13:29Brad KingNote Added: 0035773
2014-04-24 13:29Brad KingStatusnew => resolved
2014-04-24 13:29Brad KingResolutionopen => not fixable
2014-10-06 10:33Robert MaynardNote Added: 0036984
2014-10-06 10:33Robert MaynardStatusresolved => closed

Notes
(0035772)
jwo   
2014-04-24 12:06   
One additional note: The bug even occurres using the current nightly build (cmake-3.0.20140423-ge58f7.zip)
(0035773)
Brad King   
2014-04-24 13:29   
Project files generated by CMake are not meant to be included outside their own .sln file. If you must have this use case, the CMAKE_SUPPRESS_REGENERATION approach would be the recommended approach. The ZERO_CHECK projects are specific to their own build trees and cannot be shared.

If you need to build multiple CMake-based projects in a single tree but cannot process them both in a single CMake run then consider using the ExternalProject module:

 http://www.cmake.org/cmake/help/v3.0/module/ExternalProject.html [^]

If you need further help please post to the mailing list:

 http://www.cmake.org/mailman/listinfo/cmake [^]
(0036984)
Robert Maynard   
2014-10-06 10:33   
Closing resolved issues that have not been updated in more than 4 months.