[cmake-developers] C# support ready for review

Stuermer, Michael SP/HZA-ZSEP michael.stuermer at schaeffler.com
Thu Feb 18 06:44:08 EST 2016


Hi Gilles,

you are right about the specific user path. I already fixed this in my github "csharp" branch. Sorry for the inconvenience.

As for the discrepancies: I just found out that my TortoiseGitMerge tool was not configured correctly: changes in comments where ignored (which is not what I wanted). I'll go over the patch again and remove the changes that are irrelevant to the C# features.

Thanks for the hint on using MSBuild detection. I currently use the msbuild version that is provided automatically by visual studio, so I do not need any real detection. I didn't dig too deep into MSBuild versions, .NET framework versions, what can be configured etc. The configuration possibilities and what would make sense especially for other developers as well is something that should be discussed.

My main aim was to be able to work with C# and .NET in a similar way as Visual Studio provides it. I only started C# development during the last year, so many things concerning configuration etc. could probably be improved.

I'll post a new version of the patch later (or tomorrow) with the mentioned changes.

best regards,
Michael


From: Gilles Khouzam [mailto:Gilles.Khouzam at microsoft.com]
Sent: Thursday, February 18, 2016 8:17 AM
To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
Subject: RE: C# support ready for review

Hi Michael,

Great work, this looks really good.

I have a few comments on the changes.


1.       You should use the registry to find the install path for MSBuild, it should be in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild with the version that you're looking for. This also bring the question of do you want to be able to specify the version of MSBuild that is used or base it off the generator?

2.       In CMakeTestCSharpCompiler, you seem to still have a reference to your specific user path (COPY_FILE "C:/Users/stuermic/git/cmake_build/x64_14/Tests/CSharp"))

You seem to have some slight discrepancies between your code and the release as there are changes that seem to be either unnecessary or going backwards. I noticed a tegra comment that seemed out of place as well as a comment change going from 14 to 12 where 14 was accurate.

I'll try to play with this next week and get projects running on it.

~Gilles

From: cmake-developers [mailto:cmake-developers-bounces at cmake.org] On Behalf Of Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers <cmake-developers at cmake.org<mailto:cmake-developers at cmake.org>>
Subject: [cmake-developers] C# support ready for review

Native C# support is ready for review. I split the patch in two parts:

part 1:

Some preparational stuff that does not really change or enable anything. Documentation and Test files as well as the required CMake module is added. The changes to existing code are small, only few methods in existing classes are added/changed. Changes to existing code should be easy to review in this part

part 2:

This contains the main work. Almost everything takes place within cmVisualStudio10TargetGenerator.


In addition to C# support three more target properties were introduced:

*         VS_USER_PROPS_CXX (allows use of custom .user.props MSBuild file in .vcxproj files)
*         VS_USER_PROPS_CSHARP (allows use of custom .user.props MSBuild file in .csproj files)
*         VS_DEBUGGER_WORKING_DIRECTORY (allows setting of debugger working directory in .vcxproj files)

I tested the features using Visual Studio 2010-2015 in 32/64 bit and everything works on my machine so far.

Please review/test/comment and give feedback what is necessary to get native C# support in upstream cmake.

best regards,
Michael


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160218/2daabc50/attachment-0001.html>


More information about the cmake-developers mailing list