MantisBT - CMake
View Issue Details
0012586CMakeCMakepublic2011-11-20 01:192013-10-18 09:08
Aaron Ten Clay 
Brad King 
normalminoralways
closedfixed 
Windows
CMake 2.8.6 
CMake 2.8.7CMake 2.8.7 
0012586: [patch] CMake does not support Visual Studio projects types or dotnet references with managed C++
CMake currently does not support setting project types or .NET references on managed C++ projects with the Visual Studio 10 generator.

This is not a very "cross-platform" feature (unless Mono supports managed C++?) but it is necessary for unit testing projects in Visual Studio.
Create a shared library project with managed C++ files with the Visual Studio 10 generator, and observe the apparent inability to specify ProjectType value for the generated project XML file. Without specifying the correct UUID in this field, Visual Studio will not recognize the project as a unit test project.
The attached patch adds support for three new project properties:

VS_GLOBAL_PROJECT_TYPES: A string containing UUIDs to embed in the Visual Studio project file under <ProjectTypes>.

VS_GLOBAL_KEYWORD: Allows specification of a keyword like "ManagedCProj" instead of the default "Win32Proj", under <Keyword>

VS_DOTNET_REFERENCES: Semicolon-delimited list of .NET references to add to the project, which creates a new <ItemGroup>.


I tried to copy the coding style but might not have it quite right, there wasn't much guidance on the wiki. If there is a better way to introduce these changes, I'm happy to resubmit.
No tags attached.
related to 0012930closed Brad King [patch] CMake does not support Visual Studio 11 WinRT project type 
related to 0013666closed  CMake fails to support existing custom VS_GLOBAL_* properties in VS10 (ProjectExtensions -> VisualStudio -> UserProperties) 
related to 0014493closed Brad King Document relationship of VS_KEYWORD and VS_GLOBAL_KEYWORD 
patch VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupport.patch (3,634) 2011-11-20 01:19
https://public.kitware.com/Bug/file/4120/VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupport.patch
patch VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupportWithDocumentation.patch (5,285) 2011-11-23 14:11
https://public.kitware.com/Bug/file/4123/VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupportWithDocumentation.patch
Issue History
2011-11-20 01:19Aaron Ten ClayNew Issue
2011-11-20 01:19Aaron Ten ClayFile Added: VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupport.patch
2011-11-21 11:37Brad KingNote Added: 0027836
2011-11-23 14:11Aaron Ten ClayFile Added: VisualStudio10GeneratorProjectTypeAndDotNetReferenceSupportWithDocumentation.patch
2011-11-23 14:12Aaron Ten ClayNote Added: 0027853
2011-11-28 11:56Brad KingAssigned To => Brad King
2011-11-28 11:56Brad KingStatusnew => assigned
2011-11-28 11:57Brad KingNote Added: 0027859
2011-11-28 11:57Brad KingStatusassigned => resolved
2011-11-28 11:57Brad KingResolutionopen => fixed
2011-12-16 17:25David ColeFixed in Version => CMake 2.8.7
2011-12-16 17:25David ColeTarget Version => CMake 2.8.7
2012-02-03 09:04Brad KingRelationship addedrelated to 0012930
2012-07-09 06:52David ColeNote Added: 0029963
2012-07-09 06:52David ColeStatusresolved => closed
2012-11-09 08:18Brad KingRelationship addedrelated to 0013666
2013-10-18 09:08Brad KingRelationship addedrelated to 0014493

Notes
(0027836)
Brad King   
2011-11-21 11:37   
Thanks for working on this. Please update the patch to add the appropriate property documentation in cmTarget.cxx, next to the documentation for VS_SCC*.
(0027853)
Aaron Ten Clay   
2011-11-23 14:12   
I've added documentation and submitted a new patch.
(0027859)
Brad King   
2011-11-28 11:57   
This change has no effect unless the properties are set so it looks harmless to existing projects.

I applied the patch with some minor line length adjustments:

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

Thanks!
(0029963)
David Cole   
2012-07-09 06:52   
Closing resolved issues that have not been updated in more than 4 months.