[cmake-developers] C# Support and Embedded Resources

2017-05-08 Thread Roman Wüger
Hello,

I played around with the C# support in CMake 3.8.0/3.8.1.
In a project I need embedded resources, how can I add those?

Regards
Roman
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-21 Thread Stuermer, Michael SP/HZA-ZSEP
Uhm, I have to admit that I have not experience in unity development at all so 
this is not that much of a simple question for me. But my main motivation for 
native C# support in CMake was to be able to mix native C++, managed C++ and C# 
binaries within one solution and to build them all together. If this is what 
you would like to do: yes this works well for me.

best regards,
Michael

> -Original Message-
> From: doom.ooseve...@gmail.com [mailto:doom.ooseve...@gmail.com]
> On Behalf Of Jean-Michaël Celerier
> Sent: Monday, March 21, 2016 9:26 AM
> To: Stuermer, Michael SP/HZA-ZSEP
> Cc: CMake Developers
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Simple question : do you think that this would be useable in order to have a
> single build pipeline based on CMake for a Unity3D project that also requires
> some native C++ libs ?
> 
> Thanks !
> 
> 
> On Mon, Mar 21, 2016 at 8:09 AM, Stuermer, Michael  SP/HZA-ZSEP
>  wrote:
> > Sorry for asking, but do you mean
> >
> > 1. without support for ninja/nmake/make there is no use having C#
> > support in cmake
> >
> > or
> >
> > 2. using the current approach this could also work with the other
> > generators without too much additional work
> >
> > ?
> >
> > I'm just a little confused and try to find out what's on my todo list until 
> > C#
> support may reach a mature level.
> >
> > best regards,
> > Michael
> >
> >> -Original Message-
> >> From: David Cole [mailto:dlrd...@aol.com]
> >> Sent: Tuesday, March 08, 2016 12:51 AM
> >> To: Brad King
> >> Cc: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> >> Subject: Re: [cmake-developers] C# support ready for review
> >>
> >> Seems to me like C# support should work just fine with other generators:
> >> ninja, nmake, and UNIX Makefiles included. Especially with mono on
> >> Linux/Mac.
> >>
> >>
> >> David
> >>
> >> > On Mar 7, 2016, at 2:12 PM, Brad King  wrote:
> >> >
> >> >> On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
> >> >> The part that probably needs most additional work is all the C#
> >> >> detection and configuration part in the module scripts.
> >> >
> >> > In your branch Modules/CMakeDetermineCSharpCompiler.cmake
> >> currently
> >> > has a lot of logic and environment checks for this.  It shouldn't
> >> > need to be that complicated.  Anything requiring deep introspection
> >> > of the system (especially the registry) should be something done in
> >> > the C++ generator implementation and provided to CMake platform
> >> > files as a variable.
> >> >
> >> > For example, the VS generators always provide msbuild:
> >> >
> >> >
> >>
> https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMM
> >> AND.ht
> >> > ml
> >> >
> >> > For the path to the compiler tool, take a look at
> >> >
> >> > Modules/CompilerId/VS-10.vcxproj.in
> >> >
> >> > and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all
> >> > runs while detecting the compiler id using a small test project.
> >> > It has a custom command that searches the PATH in the IDE project
> >> > build environment to print out the path to the compiler.  You
> >> > should create one like this for CSharp too.
> >> >
> >> > We'll also need to define behavior when CSharp is enabled by
> >> > projects under a non-VS generator.  Other generators should reject
> >> > any such attempt with an error message.
> >> >
> >> > Thanks,
> >> > -Brad
> >> >
> >> > --
> >> >
> >> > Powered by www.kitware.com
> >> >
> >> > Please keep messages on-topic and check the CMake FAQ at:
> >> > http://www.cmake.org/Wiki/CMake_FAQ
> >> >
> >> > Kitware offers various services to support the CMake community. For
> >> > more
> >> information on each offering, please visit:
> >> >
> >> > CMake Support: http://cmake.org/cmake/help/support.html
> >> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> >> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >> >
> >> > Visit other Kitware open-source projects at
> >> > http://www.kitware.

Re: [cmake-developers] C# support ready for review

2016-03-21 Thread Jean-Michaël Celerier
Simple question : do you think that this would be useable in order to
have a single build pipeline based on CMake for a Unity3D project that
also requires some native C++ libs ?

Thanks !


On Mon, Mar 21, 2016 at 8:09 AM, Stuermer, Michael  SP/HZA-ZSEP
 wrote:
> Sorry for asking, but do you mean
>
> 1. without support for ninja/nmake/make there is no use having C# support in 
> cmake
>
> or
>
> 2. using the current approach this could also work with the other generators 
> without too much additional work
>
> ?
>
> I'm just a little confused and try to find out what's on my todo list until 
> C# support may reach a mature level.
>
> best regards,
> Michael
>
>> -Original Message-
>> From: David Cole [mailto:dlrd...@aol.com]
>> Sent: Tuesday, March 08, 2016 12:51 AM
>> To: Brad King
>> Cc: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
>> Subject: Re: [cmake-developers] C# support ready for review
>>
>> Seems to me like C# support should work just fine with other generators:
>> ninja, nmake, and UNIX Makefiles included. Especially with mono on
>> Linux/Mac.
>>
>>
>> David
>>
>> > On Mar 7, 2016, at 2:12 PM, Brad King  wrote:
>> >
>> >> On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
>> >> The part that probably needs most additional work is all the C#
>> >> detection and configuration part in the module scripts.
>> >
>> > In your branch Modules/CMakeDetermineCSharpCompiler.cmake
>> currently
>> > has a lot of logic and environment checks for this.  It shouldn't need
>> > to be that complicated.  Anything requiring deep introspection of the
>> > system (especially the registry) should be something done in the C++
>> > generator implementation and provided to CMake platform files as a
>> > variable.
>> >
>> > For example, the VS generators always provide msbuild:
>> >
>> >
>> https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMM
>> AND.ht
>> > ml
>> >
>> > For the path to the compiler tool, take a look at
>> >
>> > Modules/CompilerId/VS-10.vcxproj.in
>> >
>> > and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all
>> > runs while detecting the compiler id using a small test project.
>> > It has a custom command that searches the PATH in the IDE project
>> > build environment to print out the path to the compiler.  You should
>> > create one like this for CSharp too.
>> >
>> > We'll also need to define behavior when CSharp is enabled by projects
>> > under a non-VS generator.  Other generators should reject any such
>> > attempt with an error message.
>> >
>> > Thanks,
>> > -Brad
>> >
>> > --
>> >
>> > Powered by www.kitware.com
>> >
>> > Please keep messages on-topic and check the CMake FAQ at:
>> > http://www.cmake.org/Wiki/CMake_FAQ
>> >
>> > Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>> >
>> > CMake Support: http://cmake.org/cmake/help/support.html
>> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> > CMake Training Courses: http://cmake.org/cmake/help/training.html
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://public.kitware.com/mailman/listinfo/cmake-developers
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-21 Thread Stuermer, Michael SP/HZA-ZSEP
Sorry for asking, but do you mean

1. without support for ninja/nmake/make there is no use having C# support in 
cmake

or

2. using the current approach this could also work with the other generators 
without too much additional work

?

I'm just a little confused and try to find out what's on my todo list until C# 
support may reach a mature level.

best regards,
Michael

> -Original Message-
> From: David Cole [mailto:dlrd...@aol.com]
> Sent: Tuesday, March 08, 2016 12:51 AM
> To: Brad King
> Cc: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Seems to me like C# support should work just fine with other generators:
> ninja, nmake, and UNIX Makefiles included. Especially with mono on
> Linux/Mac.
> 
> 
> David
> 
> > On Mar 7, 2016, at 2:12 PM, Brad King  wrote:
> >
> >> On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
> >> The part that probably needs most additional work is all the C#
> >> detection and configuration part in the module scripts.
> >
> > In your branch Modules/CMakeDetermineCSharpCompiler.cmake
> currently
> > has a lot of logic and environment checks for this.  It shouldn't need
> > to be that complicated.  Anything requiring deep introspection of the
> > system (especially the registry) should be something done in the C++
> > generator implementation and provided to CMake platform files as a
> > variable.
> >
> > For example, the VS generators always provide msbuild:
> >
> >
> https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMM
> AND.ht
> > ml
> >
> > For the path to the compiler tool, take a look at
> >
> > Modules/CompilerId/VS-10.vcxproj.in
> >
> > and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all
> > runs while detecting the compiler id using a small test project.
> > It has a custom command that searches the PATH in the IDE project
> > build environment to print out the path to the compiler.  You should
> > create one like this for CSharp too.
> >
> > We'll also need to define behavior when CSharp is enabled by projects
> > under a non-VS generator.  Other generators should reject any such
> > attempt with an error message.
> >
> > Thanks,
> > -Brad
> >
> > --
> >
> > Powered by www.kitware.com
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
> >
> > CMake Support: http://cmake.org/cmake/help/support.html
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-21 Thread Stuermer, Michael SP/HZA-ZSEP
Thanks for the hints, I will adapt the C# detection.

best regards,
Michael

> -Original Message-
> From: Brad King [mailto:brad.k...@kitware.com]
> Sent: Monday, March 07, 2016 8:12 PM
> To: Stuermer, Michael SP/HZA-ZSEP
> Cc: Gilles Khouzam; CMake Developers
> Subject: Re: [cmake-developers] C# support ready for review
> 
> On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
> > The part that probably needs most additional work is all the C#
> > detection and configuration part in the module scripts.
> 
> In your branch Modules/CMakeDetermineCSharpCompiler.cmake currently
> has a lot of logic and environment checks for this.  It shouldn't need to be
> that complicated.  Anything requiring deep introspection of the system
> (especially the registry) should be something done in the C++ generator
> implementation and provided to CMake platform files as a variable.
> 
> For example, the VS generators always provide msbuild:
> 
> 
> https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMM
> AND.html
> 
> For the path to the compiler tool, take a look at
> 
>  Modules/CompilerId/VS-10.vcxproj.in
> 
> and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all runs
> while detecting the compiler id using a small test project.
> It has a custom command that searches the PATH in the IDE project build
> environment to print out the path to the compiler.  You should create one
> like this for CSharp too.
> 
> We'll also need to define behavior when CSharp is enabled by projects under
> a non-VS generator.  Other generators should reject any such attempt with
> an error message.
> 
> Thanks,
> -Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-07 Thread David Cole via cmake-developers
Seems to me like C# support should work just fine with other generators: ninja, 
nmake, and UNIX Makefiles included. Especially with mono on Linux/Mac.


David

> On Mar 7, 2016, at 2:12 PM, Brad King  wrote:
> 
>> On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
>> The part that probably needs most additional work is all the
>> C# detection and configuration part in the module scripts.
> 
> In your branch Modules/CMakeDetermineCSharpCompiler.cmake currently
> has a lot of logic and environment checks for this.  It shouldn't
> need to be that complicated.  Anything requiring deep introspection
> of the system (especially the registry) should be something done
> in the C++ generator implementation and provided to CMake platform
> files as a variable.
> 
> For example, the VS generators always provide msbuild:
> 
> https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMMAND.html
> 
> For the path to the compiler tool, take a look at
> 
> Modules/CompilerId/VS-10.vcxproj.in
> 
> and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all
> runs while detecting the compiler id using a small test project.
> It has a custom command that searches the PATH in the IDE project
> build environment to print out the path to the compiler.  You should
> create one like this for CSharp too.
> 
> We'll also need to define behavior when CSharp is enabled by projects
> under a non-VS generator.  Other generators should reject any such
> attempt with an error message.
> 
> Thanks,
> -Brad
> 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-07 Thread Brad King
On 02/25/2016 05:51 AM, Stuermer, Michael  SP/HZA-ZSEP wrote:
> The part that probably needs most additional work is all the
> C# detection and configuration part in the module scripts.

In your branch Modules/CMakeDetermineCSharpCompiler.cmake currently
has a lot of logic and environment checks for this.  It shouldn't
need to be that complicated.  Anything requiring deep introspection
of the system (especially the registry) should be something done
in the C++ generator implementation and provided to CMake platform
files as a variable.

For example, the VS generators always provide msbuild:

 https://cmake.org/cmake/help/v3.5/variable/CMAKE_VS_MSBUILD_COMMAND.html

For the path to the compiler tool, take a look at

 Modules/CompilerId/VS-10.vcxproj.in

and use of it by Modules/CMakeDetermineCompilerId.cmake.  That all
runs while detecting the compiler id using a small test project.
It has a custom command that searches the PATH in the IDE project
build environment to print out the path to the compiler.  You should
create one like this for CSharp too.

We'll also need to define behavior when CSharp is enabled by projects
under a non-VS generator.  Other generators should reject any such
attempt with an error message.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-03-01 Thread Robert Goulet
Adding test cases to the CMake source is most likely required. But that's 
probably much more involving than just writing a test case for one feature.

As for testing C# support, we only have one C# solution in our entire code 
base, so that wouldn't represent a good validation of the possible diversity 
out there. Besides, I'm not much familiar with C# development myself, and I 
would probably just end up comparing relevant differences between our current 
C# solution and what CMake would output. Not sure if I can really help here.

-Original Message-
From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com] 
Sent: Tuesday, March 1, 2016 3:50 AM
To: Robert Goulet ; Gilles Khouzam 
; CMake Developers 
Subject: RE: C# support ready for review

Ok, this leads me to the question: what is needed/missing for acceptance to 
'master'? More Documentation? More Tests? What features have to be provided by 
the module scripts? Probably some code formatting (I surely missed some 
indentation stuff and tabs instead of spaces)...

I am currently facing the problem that everything works well for me and I don't 
know what features would be required by others to work with the module. I got 
two points:

 - make LangVersion configurable
 - detect MSBuild from registry

Are there additional things missing for general use of the C# support?

best regards,
Michael

> -Original Message-
> From: Robert Goulet [mailto:robert.gou...@autodesk.com]
> Sent: Monday, February 29, 2016 3:16 PM
> To: Stuermer, Michael SP/HZA-ZSEP; Gilles Khouzam; CMake Developers
> Subject: RE: C# support ready for review
> 
> As soon as this is merged in 'master' I will give it a try. We are 
> extremely interested to have C# support in CMake. That is the last 
> piece of our entire toolchain that is currently not using CMake, so it 
> would be more than welcome to have the entire system built with CMake.
> 
> Good job!
> 
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Stuermer, Michael SP/HZA-ZSEP
> Sent: Thursday, February 25, 2016 5:52 AM
> To: Gilles Khouzam ; CMake Developers 
> 
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Hi Gilles,
> 
> good to hear C# support is working not only for me and some people are 
> actually interested in it :-).
> 
> Thanks for the patch, I already added to my github. All the changes 
> make perfectly sense for me.
> 
> Let me explain a bit more about things like hardcoding LangVersion in 
> the module scripts etc. (in short, there is no reason for hardcoding 
> langversion 3):
> 
> The current C# support was developed by plain trial-and-error. I 
> started out copying the CXX compiler module scripts, finding out the 
> relevant/necessary variables, trying to find reasonable values etc. By 
> starting with a copy of the CXX scripts I am quite sure there are some 
> leftovers that do not make sense there. To adapt everything for C# I 
> started by looking at a existing .csproj file and changing the target 
> generator until everything went as expected. Initial values like the 
> flags in CMakeCSharpInformation.cmake where copied as is from my first 
> simple reference .csproj files. Also the special handling of .xaml, 
> .xaml.cs and .Designer.cs files with the  tags was just 
> introduced when I realized I need it somewhere in our new project.
> 
> Putting it all together I just want to say that the current state of 
> development leaves room for a lot of improvement and if something 
> seems like it could be done better, this is most probably the case. I 
> really only pushed it to a level where I feel it's working well enough for me 
> and I can focus on my actual job.
> 
> The part that probably needs most additional work is all the C# 
> detection and configuration part in the module scripts. I got it all 
> up and running so we can develop our C/C++/C# cross-platform software 
> here, but it's still some steps away from a perfectly configurable solution 
> where everyone could be happy.
> 
> best regards,
> Michael
> 
> 
> From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com]
> Sent: Thursday, February 25, 2016 8:44 AM
> To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: RE: C# support ready for review
> 
> Hi Michael,
> 
> Things are looking really good, I've just converted one of my personal 
> projects to using CMake in very little time.
> 
> I've included a small patch for your CSharp implementation.
> 
> The first change is to add support to specify C# 6.0 in the flag table.
> The second removes the exception handling tag and the precompiled 
> header tags since they don't make sen

Re: [cmake-developers] C# support ready for review

2016-03-01 Thread Stuermer, Michael SP/HZA-ZSEP
Ok, this leads me to the question: what is needed/missing for acceptance to 
'master'? More Documentation? More Tests? What features have to be provided by 
the module scripts? Probably some code formatting (I surely missed some 
indentation stuff and tabs instead of spaces)...

I am currently facing the problem that everything works well for me and I don't 
know what features would be required by others to work with the module. I got 
two points:

 - make LangVersion configurable
 - detect MSBuild from registry

Are there additional things missing for general use of the C# support?

best regards,
Michael

> -Original Message-
> From: Robert Goulet [mailto:robert.gou...@autodesk.com]
> Sent: Monday, February 29, 2016 3:16 PM
> To: Stuermer, Michael SP/HZA-ZSEP; Gilles Khouzam; CMake Developers
> Subject: RE: C# support ready for review
> 
> As soon as this is merged in 'master' I will give it a try. We are extremely
> interested to have C# support in CMake. That is the last piece of our entire
> toolchain that is currently not using CMake, so it would be more than
> welcome to have the entire system built with CMake.
> 
> Good job!
> 
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Stuermer, Michael SP/HZA-ZSEP
> Sent: Thursday, February 25, 2016 5:52 AM
> To: Gilles Khouzam ; CMake Developers
> 
> Subject: Re: [cmake-developers] C# support ready for review
> 
> Hi Gilles,
> 
> good to hear C# support is working not only for me and some people are
> actually interested in it :-).
> 
> Thanks for the patch, I already added to my github. All the changes make
> perfectly sense for me.
> 
> Let me explain a bit more about things like hardcoding LangVersion in the
> module scripts etc. (in short, there is no reason for hardcoding langversion 
> 3):
> 
> The current C# support was developed by plain trial-and-error. I started out
> copying the CXX compiler module scripts, finding out the relevant/necessary
> variables, trying to find reasonable values etc. By starting with a copy of 
> the
> CXX scripts I am quite sure there are some leftovers that do not make sense
> there. To adapt everything for C# I started by looking at a existing .csproj 
> file
> and changing the target generator until everything went as expected. Initial
> values like the flags in CMakeCSharpInformation.cmake where copied as is
> from my first simple reference .csproj files. Also the special handling of 
> .xaml,
> .xaml.cs and .Designer.cs files with the  tags was just
> introduced when I realized I need it somewhere in our new project.
> 
> Putting it all together I just want to say that the current state of 
> development
> leaves room for a lot of improvement and if something seems like it could be
> done better, this is most probably the case. I really only pushed it to a 
> level
> where I feel it's working well enough for me and I can focus on my actual job.
> 
> The part that probably needs most additional work is all the C# detection and
> configuration part in the module scripts. I got it all up and running so we 
> can
> develop our C/C++/C# cross-platform software here, but it's still some steps
> away from a perfectly configurable solution where everyone could be happy.
> 
> best regards,
> Michael
> 
> 
> From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com]
> Sent: Thursday, February 25, 2016 8:44 AM
> To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
> Subject: RE: C# support ready for review
> 
> Hi Michael,
> 
> Things are looking really good, I've just converted one of my personal
> projects to using CMake in very little time.
> 
> I've included a small patch for your CSharp implementation.
> 
> The first change is to add support to specify C# 6.0 in the flag table.
> The second removes the exception handling tag and the precompiled header
> tags since they don't make sense for C#, as well as adding a space between
> the platform comparisons. The space is not necessary for the project, but is
> you make any change in the property page inside of VS, a new property
> group is created instead of modifying the existing one. While this would not
> be a typical CMake scenario, it might be better to stay consistent with how
> VS and MSBuild process the file.
> 
> The next thing that I want to start looking at, is to make this work for
> Windows Phone and Windows Store apps, so that it can match the support
> that we have with C++ in this regards.
> 
> From: Gilles Khouzam
> Sent: Wednesday, February 24, 2016 14:47
> To: 'Stuermer, Michael SP/HZA-ZSEP' ;
> CMake Developers 
> Subject: RE: C# support ready for 

Re: [cmake-developers] C# support ready for review

2016-02-29 Thread Robert Goulet
As soon as this is merged in 'master' I will give it a try. We are extremely 
interested to have C# support in CMake. That is the last piece of our entire 
toolchain that is currently not using CMake, so it would be more than welcome 
to have the entire system built with CMake.

Good job!

-Original Message-
From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Thursday, February 25, 2016 5:52 AM
To: Gilles Khouzam ; CMake Developers 

Subject: Re: [cmake-developers] C# support ready for review

Hi Gilles,

good to hear C# support is working not only for me and some people are actually 
interested in it :-).

Thanks for the patch, I already added to my github. All the changes make 
perfectly sense for me.

Let me explain a bit more about things like hardcoding LangVersion in the 
module scripts etc. (in short, there is no reason for hardcoding langversion 3):

The current C# support was developed by plain trial-and-error. I started out 
copying the CXX compiler module scripts, finding out the relevant/necessary 
variables, trying to find reasonable values etc. By starting with a copy of the 
CXX scripts I am quite sure there are some leftovers that do not make sense 
there. To adapt everything for C# I started by looking at a existing .csproj 
file and changing the target generator until everything went as expected. 
Initial values like the flags in CMakeCSharpInformation.cmake where copied as 
is from my first simple reference .csproj files. Also the special handling of 
.xaml, .xaml.cs and .Designer.cs files with the  tags was just 
introduced when I realized I need it somewhere in our new project.

Putting it all together I just want to say that the current state of 
development leaves room for a lot of improvement and if something seems like it 
could be done better, this is most probably the case. I really only pushed it 
to a level where I feel it's working well enough for me and I can focus on my 
actual job.

The part that probably needs most additional work is all the C# detection and 
configuration part in the module scripts. I got it all up and running so we can 
develop our C/C++/C# cross-platform software here, but it's still some steps 
away from a perfectly configurable solution where everyone could be happy.

best regards,
Michael


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

Hi Michael,

Things are looking really good, I've just converted one of my personal projects 
to using CMake in very little time.

I've included a small patch for your CSharp implementation.

The first change is to add support to specify C# 6.0 in the flag table.
The second removes the exception handling tag and the precompiled header tags 
since they don't make sense for C#, as well as adding a space between the 
platform comparisons. The space is not necessary for the project, but is you 
make any change in the property page inside of VS, a new property group is 
created instead of modifying the existing one. While this would not be a 
typical CMake scenario, it might be better to stay consistent with how VS and 
MSBuild process the file.

The next thing that I want to start looking at, is to make this work for 
Windows Phone and Windows Store apps, so that it can match the support that we 
have with C++ in this regards.

From: Gilles Khouzam
Sent: Wednesday, February 24, 2016 14:47
To: 'Stuermer, Michael SP/HZA-ZSEP' ; CMake 
Developers 
Subject: RE: C# support ready for review

Hi Michael,

I've had more time to try this, what is the reasoning to hardcode the default 
LangVersion to 3 in Modules\CMakeCSharpInformation.cmake? Can we remove it? I'm 
trying this on some projects of mine.

From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com]
Sent: Thursday, February 18, 2016 03:44
To: Gilles Khouzam ; CMake Developers 

Subject: RE: C# support ready for review

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

Re: [cmake-developers] C# support ready for review

2016-02-25 Thread Stuermer, Michael SP/HZA-ZSEP
.

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-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers 
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
 
 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-02-25 Thread Gilles Khouzam
Hi Michael,

Things are looking really good, I've just converted one of my personal projects 
to using CMake in very little time.

I've included a small patch for your CSharp implementation.

The first change is to add support to specify C# 6.0 in the flag table.
The second removes the exception handling tag and the precompiled header tags 
since they don't make sense for C#, as well as adding a space between the 
platform comparisons. The space is not necessary for the project, but is you 
make any change in the property page inside of VS, a new property group is 
created instead of modifying the existing one. While this would not be a 
typical CMake scenario, it might be better to stay consistent with how VS and 
MSBuild process the file.

The next thing that I want to start looking at, is to make this work for 
Windows Phone and Windows Store apps, so that it can match the support that we 
have with C++ in this regards.

From: Gilles Khouzam
Sent: Wednesday, February 24, 2016 14:47
To: 'Stuermer, Michael SP/HZA-ZSEP' ; CMake 
Developers 
Subject: RE: C# support ready for review

Hi Michael,

I've had more time to try this, what is the reasoning to hardcode the default 
LangVersion to 3 in Modules\CMakeCSharpInformation.cmake? Can we remove it? I'm 
trying this on some projects of mine.

From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com]
Sent: Thursday, February 18, 2016 03:44
To: Gilles Khouzam 
mailto:gilles.khou...@microsoft.com>>; CMake 
Developers mailto:cmake-developers@cmake.org>>
Subject: RE: C# support ready for review

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.khou...@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-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers 
mailto:cmake-developers@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 
.csp

Re: [cmake-developers] C# support ready for review

2016-02-24 Thread Gilles Khouzam
Hi Michael,

I've had more time to try this, what is the reasoning to hardcode the default 
LangVersion to 3 in Modules\CMakeCSharpInformation.cmake? Can we remove it? I'm 
trying this on some projects of mine.

From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com]
Sent: Thursday, February 18, 2016 03:44
To: Gilles Khouzam ; CMake Developers 

Subject: RE: C# support ready for review

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.khou...@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-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers 
mailto:cmake-developers@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


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] C# support ready for review (update)

2016-02-18 Thread Stuermer, Michael SP/HZA-ZSEP
Hello all,

here is an update of the C# support patch. I fixed the errors & discrepancies 
reported by Gilles. Hope it looks better now.

My development branch can be found here:

https://github.com/micst/CMake/tree/csharp

It is in the same state as the patch, but includes a few changes which I need 
for local building and usage.

best regards,
Michael

From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 3:03 PM
To: CMake Developers
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




0001-prepared-CSharp-support.patch
Description: 0001-prepared-CSharp-support.patch


0002-implemented-CSharp-support.patch
Description: 0002-implemented-CSharp-support.patch
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support ready for review

2016-02-18 Thread Stuermer, Michael SP/HZA-ZSEP
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.khou...@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-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers 
mailto:cmake-developers@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


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support ready for review

2016-02-17 Thread Gilles Khouzam
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-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Wednesday, February 10, 2016 06:03
To: CMake Developers 
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


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] C# support ready for review

2016-02-10 Thread Stuermer, Michael SP/HZA-ZSEP
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






0001-prepared-C-support.patch
Description: 0001-prepared-C-support.patch


0002-implemented-C-support.patch
Description: 0002-implemented-C-support.patch
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support status?

2015-11-03 Thread Ben Boeckel
On Tue, Nov 03, 2015 at 10:39:06 +, Stuermer, Michael  SP/HZA-ZSEP wrote:
> At the moment only visual studio generator and only version 2013 is
> accepted/implemented. It should not be a big task to enhance it to
> support 2015 as well. It would be great to have at least nmake, but I
> have absolutely no time right now to continue my work on C# support
> for CMake.

For anyone who would like to work on this, at the least, the other
generators should error out with CSharp rules. Don't follow
Fortran-in-Ninja's example though; the error should occur when a CSharp
rule should be generated, not when the language is enabled.

For proper Makefile support (and Ninja?), a C# depfile generator will
need to be created (see cmcldeps and cmddeps from the D support
branch[1]).

--Ben

[1]https://github.com/trentforkert/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support status?

2015-11-03 Thread Stuermer, Michael SP/HZA-ZSEP
Hi,

there is an initial implementation on my github:

https://github.com/micst/CMake

Check out the "csharp" branch. It merges well with the current master of CMake 
(last test yesterday, but not yet pushed to github). I would love to see this 
in upstream some day, but currently quite a bunch of work is missing until it 
can get accepted:


-  the module scripts for finding and configuring the compiler should 
be improved, I just hacked them so that my build here works

-  documentation does not really exist. I added a few target- and 
file-properties that need explanation as well as some automated bundling of 
.resx|.settings|.Designer.cs|.xaml files with corresponding .cs sources.

-  tests ... well they are missing as well :(

At the moment only visual studio generator and only version 2013 is 
accepted/implemented. It should not be a big task to enhance it to support 2015 
as well. It would be great to have at least nmake, but I have absolutely no 
time right now to continue my work on C# support for CMake.

I have a test-project for testing the C# support on github

https://github.com/micst/CMakeCSharpTest

but I'm not sure if it still works as didn't run it for quite some time.

Please let me know if you like to contribute in any way to this.


Best Regards

Michael Stürmer
SP/HZA-ZSEP
Postcode HZA 13-4-06
SZ.Prozessdatenverarbeitung

Schaeffler Technologies AG & Co. KG
Industriestraße 1-3
91074 Herzogenaurach (Germany)
Tel. +49  91 32 / 82 - 86350  ·  Fax +49 91 32 / 82 - 45 86350
Mobil.: +49 171 6860010
mailto:michael.stuer...@schaeffler.com  
·  http://www.ina.de

Registered Seat: Herzogenaurach
Commercial Register: AG Fürth HRA 9349

General Partner: INA Beteiligungsgesellschaft mit beschränkter Haftung 
Registered Seat: Herzogenaurach (Germany)
Commercial Register: AG Fürth HRB 2379

Managing Directors:
Klaus Rosenfeld (CEO), Prof. Dr. Peter Gutzmer, Norbert Indlekofer, Oliver 
Jung, Kurt Mirlach, Prof. Dr. Peter Pleus, Robert Schullan

This e-mail message is intended only for the use of the named recipient-(s) and 
contains information which may be confidential or privileged. If you are not 
the intended recipient, be aware that any distribution, or use of the contents 
of this information is prohibited. If you have received this electronic 
transmission in error, please notify the sender and delete the material from 
the computer.




From: Robert Goulet [mailto:robert.gou...@autodesk.com]
Sent: Monday, November 02, 2015 10:25 PM
To: Stuermer, Michael SP/HZA-ZSEP; cmake-developers@cmake.org; Gilles Khouzam
Subject: C# support status?

Hi,

I saw a C# support thread some time ago, and I was wondering what is the status 
of this so far. Is there an initial implementation merged in any branch?

Here at the office we are using CMake to generate projects for our game engine 
(all platforms), however the editor itself has some C# code, and preferably we 
would want to generate the .csproj files with CMake as well.

We are also available to test this implementation once it is merged in any 
CMake branch. We have the ability to test it with VS2015 if that matters.

Thanks!

-Robert Goulet
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] C# support status?

2015-11-02 Thread Robert Goulet
Hi,

I saw a C# support thread some time ago, and I was wondering what is the status 
of this so far. Is there an initial implementation merged in any branch?

Here at the office we are using CMake to generate projects for our game engine 
(all platforms), however the editor itself has some C# code, and preferably we 
would want to generate the .csproj files with CMake as well.

We are also available to test this implementation once it is merged in any 
CMake branch. We have the ability to test it with VS2015 if that matters.

Thanks!

-Robert Goulet
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support?

2015-07-15 Thread Brad King
On 07/02/2015 09:53 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> I got the first sort of working version running. Would be great
> if some people could have a look at it if it's going into a
> good direction.

Thanks again for working on this.  Sorry for the delay in response.
I was working on the basic Apple Swift support and thought it could
be a useful example for CSharp work.

> Patch 0001:
>  - adds the necessary Module/* files for enabling C# as a language

Some of the CMakeCSharpInformation module content like:

> +set(CMAKE_CSharp_FLAGS_INIT "/define:TRACE /langversion:3 /nowin32manifest")
> +set(CMAKE_CSharp_FLAGS_DEBUG_INIT "/debug:full /optimize- /warn:3 
> /errorreport:prompt /define:DEBUG")
> +set(CMAKE_CSharp_FLAGS_RELEASE_INIT "/debug:none /optimize  /warn:1  
> /errorreport:queue")
> +set(CMAKE_CSharp_FLAGS_RELWITHDEBINFO_INIT "/debug:full /optimize-")
> +set(CMAKE_CSharp_FLAGS_MINSIZEREL_INIT "/debug:none /optimize")

belongs in a file such as Modules/Platform/Windows-MSVC-CSharp.cmake
file.  The CMakeCSharpInformation file should have only information
specific to the C# language and not any particular toolchain and then
load other modules that provide information specific to the platform
and toolchain vendor (compiler id).  See the recently added
CMakeSwiftInformation module for an example.

> Patch 0002:
>  - some minor changes to mostly visual studio related classes to enable 
> .csproj support
>o .csproj GUID is added
>o a method to check if the target is C# is added

Looks good at a glance.

> Patch 0003:
>  - the actual implementation of the .csproj generation
>  - all generation takes place inside VisualStudio10TargetGenerator class

That looks like the right direction.  How did you generate the flag
table?  The other flag tables we have for VS >= 10 generators are
generated by Source/cmparseMSBuildXML.py.  See commit

 VS14: Generate flag tables from MSBuild v140 tool files
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d96b3f68

for an example.  Typically we add a new flag table generated by
the script in one commit and then add follow-up commits to apply
manual tweaks.  That way we know exactly how to reproduce the
table.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support?

2015-07-03 Thread Stuermer, Michael SP/HZA-ZSEP
Hi all,

some minor updates to the patches. There where 2-3 bugs somewhere...

https://github.com/micst/CMake/tree/csharp is up to date.

best regards,
Michael

> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On
> Behalf Of Stuermer, Michael SP/HZA-ZSEP
> Sent: Thursday, July 02, 2015 3:54 PM
> To: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
> 
> Hi all,
> 
> I got the first sort of working version running. Would be great if some
> people could have a look at it if it's going into a good direction.
> 
> Some explanations:
> 
> Patch 0001:
>  - adds the necessary Module/* files for enabling C# as a language
>  - CAUTION: only Visual Studio 2013 generators are supported at the
> moment
>  - there is a verbose message which is shown when C# is used to guide
> people where to go for improvement
> 
> Patch 0002:
>  - some minor changes to mostly visual studio related classes to enable
> .csproj support
>o .csproj GUID is added
>o a method to check if the target is C# is added
> 
> Patch 0003:
>  - the actual implementation of the .csproj generation
>  - all generation takes place inside VisualStudio10TargetGenerator
> class
> 
> 
> There is an example project in the appendix of this mail which you can
> use to see how .csproj can be generated now.
> 
> And yes, there are still quite some things missing:
> 
>  - Tests ()
>  - NMake support (even though that should not bee too hard)
>o better handling of the flagtable that I added (not sure if I
> understood correctly how the concept is supposed to be used)
>  - documentation ()
> 
> Most questions on how to use the C# language and mixing with C++
> targets should be answered by looking at the example project.
> 
> Some VS_* target properties already existed which I reused.
> 
> I added two Property-"Groups":
>  - VS_DOTNET_REFERENCE_properties for references with a
>  tag, though they
>  also can be added to the normal
> VS_DOTNET_REFERENCES. This is
>  a target-property
>  - CSharpPROJ_ the tag  will be added to
> the  tag of the specified
>  Source files. This is a source
> property.
>  - CSharpPROJ_SubTypethe currently only used case of
> above property group. It's needed
>  to tell visual studio what kind of
> file is added. You can safely omit
>  this, but visual studio will not
> be able to run the designer in the
>  correct mode without it.
> 
> Project references are added by simply using target_link_libraries().
> All other references must use done in one of the above described ways.
> 
> It would be great if some people could try if the example project works
> for them. If you have improvements don't hesitate to submit any patch
> to my current fork on github (branch "csharp"):
> 
> https://github.com/micst/CMake.git
> 
> The example project can be found there as well:
> 
> https://github.com/micst/CMakeCSharpTest.git
> 
> 
> best regards,
> Michael
> 
> 
> 
> > -Original Message-
> > From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On
> > Behalf Of Brad King
> > Sent: Tuesday, June 30, 2015 3:49 PM
> > To: cmake-developers@cmake.org
> > Subject: Re: [cmake-developers] C# support?
> >
> > On 06/30/2015 03:21 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> > > it would be great if some people could step forward once everything
> > is
> > > running from my side to help get makefile and linux support (and
> > > test other Visual Studio versions).
> >
> > Once you have it working in VS 2013 the other VS >= 2010 versions
> > should be easy.  I'm not sure about other generators yet.  If you
> have
> > good coverage in the test suite updates then that will make the task
> > of adding support to other generators easier.
> >
> > For now you can have CMakeDetermineCSharpCompiler do a
> > message(FATAL_ERROR) when CMAKE_GENERATOR is set to a value that is
> > not supported.  That can be lifted when the other generators
> implement
> > the language.
> >
> > > About enable_language():
> > >
> > > have the appropriate cmake-scripts in "Module" directory
> > [snip]
> > > Almost everything relevant goes in the target generator class
> > > VisualStudio10TargetGenerator.
> >
> &

Re: [cmake-developers] C# support?

2015-06-30 Thread Gilles Khouzam
Michael, this is great. Thank you for doing this. I will gladly help with the 
other versions of Visual Studio and can provide some help if you need. Feel 
free to reach out.
 

~Gilles Khouzam

-Original Message-
From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of 
Stuermer, Michael SP/HZA-ZSEP
Sent: Tuesday, June 30, 2015 00:22
To: cmake-developers@cmake.org
Subject: Re: [cmake-developers] C# support?

Hi and thanks for all your answers,

Let me give you some information how things are implemented so far and where my 
constraints in implementing C# support are:

At the moment I have only Visual Studio 2013 available, which makes it hard for 
me to test any other generators. NMake is not a priority for me, but the 
concept of the Visual Studio generators in CMake is so nice implemented, that 
it should not be much of a problem to get this running. I will have a look on 
this once Visual Studio generators are working. I will be able to test some 
linux/mono functionality in VirtualBox, but I will most probably not have much 
time. We are working on Windows based software here and I will not be allowed 
to spent a vast amount of time working on non-project related topics.

In short: it would be great if some people could step forward once everything 
is running from my side to help get makefile and linux support (and test other 
Visual Studio versions).

About enable_language():

Working. From my knowledge it's mainly about have the appropriate cmake-scripts 
in "Module" directory. That's done, my test project builds well with it. Ok, 
the CMakeTest... script simply sets "WORKS" to true ... that could be improved 
...

About .csproj files:

It's almost done, the files are generated already and working well. There still 
needs to be some cleaning and generalization to use parameters instead of hard 
coded information.

About intrusiveness:

Almost everything relevant goes in the target generator class 
VisualStudio10TargetGenerator. The necessary .cmake files for the language are 
added and some minor changes to other generator sources are needed (for setting 
target type GUID in .sln etc.). All changes so far are made to be as minimal as 
possible to the original cmake sources and I believe it blends in quite well. 
Credit goes to the guys who implemented the VisualStudio generator concept with 
the flagmaps. You need some time to understand it, but once you've got it it's 
really great.

About C#/.NET:

I'm new to .NET and C# as well, but it seems not to provide too many surprises. 
Nevertheless some challenges remain to come up with a good solution for C# 
integration. It's mainly about reference handling. I have a working example at 
the moment, but it could be improved further.

About the language:

Would it be ok to name the language in CMake "CS" instead of "CSharp"? I did 
everything as "CS" so far...

About contributing:

Once done, do you want patchfiles here on the list or a pull request from my 
fork on github?

---

If someone is interested in the development so far, you can check out my CMake 
fork here (have a look at the "csharp" branch):

https://github.com/micst/CMake.git

The test project with mixed C++/C# targets, cross-referencing from

C++ <--> managed C++ <--> C#

can be found here:

https://github.com/micst/CMakeCSharpTest.git


best regards,
Michael


> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On 
> Behalf Of David Cole via cmake-developers
> Sent: Monday, June 29, 2015 7:31 PM
> To: Brad King
> Cc: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
> 
> The C# compiler, csc.exe, takes all its arguments at once in one call 
> to build a library or executable. Listing all the sources, and its 
> references (other libraries it depends on) all at once. You can do it 
> as command line arguments, or as contents of a response file, or a 
> combination or arguments plus response file.
> 
> Conceptually, it's "just like Java."
> 
> They do have separate project files for it with VS, though. The 
> generators will need code to generate *.csproj files, rather than 
> custom commands in a vcxproj file, to make it seem like it's really 
> well-integrated with VS. Not sure if *.csproj files have evolved much 
> over the last few releases of VS -- I'd expect the major challenge 
> with this to be making sure CMake generates proper *.csproj files for 
> however many versions of VS it would take to make it acceptable.
> 
> 
> D
> 
> 
> 
> On Mon, Jun 29, 2015 at 1:05 PM, Brad King 
> wrote:
> > On 06/26/2015 10:47 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> >> Does it have a realistic chance to be a

Re: [cmake-developers] C# support?

2015-06-30 Thread James Johnston
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of Brad King
> Sent: Tuesday, June 30, 2015 13:49
> To: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
> 
> On 06/30/2015 03:21 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> > it would be great if some people could step forward once everything is
> > running from my side to help get makefile and linux support (and test
> > other Visual Studio versions).
> 
> Once you have it working in VS 2013 the other VS >= 2010 versions should
be
> easy.  I'm not sure about other generators yet.  If you have good coverage
in
> the test suite updates then that will make the task of adding support to
other
> generators easier.

What about Visual Studio 2005 / 2008?  In those scenarios:
 * The Visual C++ projects are NOT MSBuild projects (as the CMake devs I'm
sure well know)
 * The Visual C# project *is* an MSBuild project.

My guess is if targeting VS2005/2008, you'd need to somehow use code as
follows:
 * The Visual C++ 2005/2008 projects generated as normal using
VisualStudio8/9TargetGenerator classes.
 * The Visual C# 2005/2008 projects are MSBuild so you'd have to use the new
code in VisualStudio10TargetGenerator when your CMake generator was set to
"Visual Studio 8/9"?  It sounds goofy...
 * And all the above projects put into one final VS2005/2008 solution file.

Best regards,

James Johnston

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support?

2015-06-30 Thread Brad King
On 06/30/2015 03:21 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> it would be great if some people could step forward once
> everything is running from my side to help get makefile and linux
> support (and test other Visual Studio versions).

Once you have it working in VS 2013 the other VS >= 2010 versions
should be easy.  I'm not sure about other generators yet.  If you
have good coverage in the test suite updates then that will make
the task of adding support to other generators easier.

For now you can have CMakeDetermineCSharpCompiler do a
message(FATAL_ERROR) when CMAKE_GENERATOR is set to a value that
is not supported.  That can be lifted when the other generators
implement the language.

> About enable_language():
> 
> have the appropriate cmake-scripts in "Module" directory
[snip]
> Almost everything relevant goes in the target generator class
> VisualStudio10TargetGenerator.

Great!

> Once done, do you want patchfiles here on the list or a pull
> request from my fork on github?

Please send patch files here as requested in CONTRIBUTING.rst.
Please re-organize commits into a logical series of updates
rather than the original unorganized development history.

Thanks!
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support?

2015-06-30 Thread David Cole via cmake-developers
Yes, please do spell it out as CSharp. CS could mean about a billion things...

On Tue, Jun 30, 2015 at 5:19 AM, Stuermer, Michael  SP/HZA-ZSEP
 wrote:
> Sounds reasonable,
>
>
>
> my choice was motivated by the file extension of the C# source files (.cs)
> and that it is shorter. But as Fortran seems to use the longer “Fortran”
> description it might be a good idea to switch to “CSharp” as well …
>
>
>
> Michael
>
>
>
> From: Petr Kmoch [mailto:petr.km...@gmail.com]
> Sent: Tuesday, June 30, 2015 10:18 AM
> To: Stuermer, Michael SP/HZA-ZSEP
> Cc: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
>
>
>
> On Tue, Jun 30, 2015 at 9:21 AM, Stuermer, Michael SP/HZA-ZSEP
>  wrote:
>
> [...]
>
> About the language:
>
> Would it be ok to name the language in CMake "CS" instead of "CSharp"? I did
> everything as "CS" so far...
>
>
>
> If I may provide an outsider's comment on this point, I would suggest
> against this. For me, "CS" does not intuitively associate with C# - I
> wouldn't know it means C# unless I read it somewhere stated explicitly. "C",
> "CXX", "Fortran" are all obvious to me, "CS" is not.
>
> Then again, I have never used C#, so it might just be general unfamiliarity
> on my part, in which case feel free to ignore this post.
>
> Petr
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support?

2015-06-30 Thread Stuermer, Michael SP/HZA-ZSEP
Sounds reasonable,

my choice was motivated by the file extension of the C# source files (.cs) and 
that it is shorter. But as Fortran seems to use the longer “Fortran” 
description it might be a good idea to switch to “CSharp” as well …

Michael

From: Petr Kmoch [mailto:petr.km...@gmail.com]
Sent: Tuesday, June 30, 2015 10:18 AM
To: Stuermer, Michael SP/HZA-ZSEP
Cc: cmake-developers@cmake.org
Subject: Re: [cmake-developers] C# support?

On Tue, Jun 30, 2015 at 9:21 AM, Stuermer, Michael SP/HZA-ZSEP 
mailto:michael.stuer...@schaeffler.com>> wrote:
[...]

About the language:

Would it be ok to name the language in CMake "CS" instead of "CSharp"? I did 
everything as "CS" so far...

If I may provide an outsider's comment on this point, I would suggest against 
this. For me, "CS" does not intuitively associate with C# - I wouldn't know it 
means C# unless I read it somewhere stated explicitly. "C", "CXX", "Fortran" 
are all obvious to me, "CS" is not.

Then again, I have never used C#, so it might just be general unfamiliarity on 
my part, in which case feel free to ignore this post.
Petr

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support?

2015-06-30 Thread Petr Kmoch
On Tue, Jun 30, 2015 at 9:21 AM, Stuermer, Michael SP/HZA-ZSEP <
michael.stuer...@schaeffler.com> wrote:

> [...]
>
> About the language:
>
> Would it be ok to name the language in CMake "CS" instead of "CSharp"? I
> did everything as "CS" so far...
>

If I may provide an outsider's comment on this point, I would suggest
against this. For me, "CS" does not intuitively associate with C# - I
wouldn't know it means C# unless I read it somewhere stated explicitly.
"C", "CXX", "Fortran" are all obvious to me, "CS" is not.

Then again, I have never used C#, so it might just be general unfamiliarity
on my part, in which case feel free to ignore this post.

Petr
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support?

2015-06-30 Thread Stuermer, Michael SP/HZA-ZSEP
Hi and thanks for all your answers,

Let me give you some information how things are implemented so far and where my 
constraints in implementing C# support are:

At the moment I have only Visual Studio 2013 available, which makes it hard for 
me to test any other generators. NMake is not a priority for me, but the 
concept of the Visual Studio generators in CMake is so nice implemented, that 
it should not be much of a problem to get this running. I will have a look on 
this once Visual Studio generators are working. I will be able to test some 
linux/mono functionality in VirtualBox, but I will most probably not have much 
time. We are working on Windows based software here and I will not be allowed 
to spent a vast amount of time working on non-project related topics.

In short: it would be great if some people could step forward once everything 
is running from my side to help get makefile and linux support (and test other 
Visual Studio versions).

About enable_language():

Working. From my knowledge it's mainly about have the appropriate cmake-scripts 
in "Module" directory. That's done, my test project builds well with it. Ok, 
the CMakeTest... script simply sets "WORKS" to true ... that could be improved 
...

About .csproj files:

It's almost done, the files are generated already and working well. There still 
needs to be some cleaning and generalization to use parameters instead of hard 
coded information.

About intrusiveness:

Almost everything relevant goes in the target generator class 
VisualStudio10TargetGenerator. The necessary .cmake files for the language are 
added and some minor changes to other generator sources are needed (for setting 
target type GUID in .sln etc.). All changes so far are made to be as minimal as 
possible to the original cmake sources and I believe it blends in quite well. 
Credit goes to the guys who implemented the VisualStudio generator concept with 
the flagmaps. You need some time to understand it, but once you've got it it's 
really great.

About C#/.NET:

I'm new to .NET and C# as well, but it seems not to provide too many surprises. 
Nevertheless some challenges remain to come up with a good solution for C# 
integration. It's mainly about reference handling. I have a working example at 
the moment, but it could be improved further.

About the language:

Would it be ok to name the language in CMake "CS" instead of "CSharp"? I did 
everything as "CS" so far...

About contributing:

Once done, do you want patchfiles here on the list or a pull request from my 
fork on github?

---

If someone is interested in the development so far, you can check out my CMake 
fork here (have a look at the "csharp" branch):

https://github.com/micst/CMake.git

The test project with mixed C++/C# targets, cross-referencing from

C++ <--> managed C++ <--> C#

can be found here:

https://github.com/micst/CMakeCSharpTest.git


best regards,
Michael


> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On
> Behalf Of David Cole via cmake-developers
> Sent: Monday, June 29, 2015 7:31 PM
> To: Brad King
> Cc: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
> 
> The C# compiler, csc.exe, takes all its arguments at once in one call
> to build a library or executable. Listing all the sources, and its
> references (other libraries it depends on) all at once. You can do it
> as command line arguments, or as contents of a response file, or a
> combination or arguments plus response file.
> 
> Conceptually, it's "just like Java."
> 
> They do have separate project files for it with VS, though. The
> generators will need code to generate *.csproj files, rather than
> custom commands in a vcxproj file, to make it seem like it's really
> well-integrated with VS. Not sure if *.csproj files have evolved much
> over the last few releases of VS -- I'd expect the major challenge with
> this to be making sure CMake generates proper *.csproj files for
> however many versions of VS it would take to make it acceptable.
> 
> 
> D
> 
> 
> 
> On Mon, Jun 29, 2015 at 1:05 PM, Brad King 
> wrote:
> > On 06/26/2015 10:47 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> >> Does it have a realistic chance to be accepted for upstream
> >
> > Yes, so long as it comes with proper tests and is not too intrusive
> on
> > the overall design/implementation of CMake.
> >
> > In order to enable use of C# sources we should get
> >
> >  enable_language(CSharp)
> >
> > to work.  This is likely straightforward with the VS generators.
> >
> > One question is how things should be done for the Make

Re: [cmake-developers] C# support?

2015-06-29 Thread James Johnston
> -Original Message-
> From: cmake-developers [mailto:cmake-developers-boun...@cmake.org]
> On Behalf Of David Cole via cmake-developers
> Sent: Monday, June 29, 2015 17:31
> To: Brad King
> Cc: cmake-developers@cmake.org
> Subject: Re: [cmake-developers] C# support?
> 
> The C# compiler, csc.exe, takes all its arguments at once in one call to
build a
> library or executable. Listing all the sources, and its references (other
libraries
> it depends on) all at once. You can do it as command line arguments, or as
> contents of a response file, or a combination or arguments plus response
file.
> 
> Conceptually, it's "just like Java."

Exactly right; it's like a combined compiler+linker.  It's also worth noting
that the C# and VB .NET languages doesn't have the concept of "#include"
preprocessor directives.  Header files are a non-issue.  (Once you got that
working, I'd imagine Java language support would be easy, too...)

> They do have separate project files for it with VS, though. The generators
will
> need code to generate *.csproj files, rather than custom commands in a
> vcxproj file, to make it seem like it's really well-integrated with VS.
Not sure if
> *.csproj files have evolved much over the last few releases of VS -- I'd
expect
> the major challenge with this to be making sure CMake generates proper
> *.csproj files for however many versions of VS it would take to make it
> acceptable.

Csproj files are MSBuild compatible, like how Visual C++ 2010 vcxproj files
are.  While Visual C++ went to MSBuild recently (VS2010), Visual C# has been
MSBuild compatible since MSBuild's inception - Visual Studio 2005 if I
remember right.  Visual Studio 2002/2003 might be different since they
pre-date MSBuild but since the VC++ 2002 generator was recently deprecated
I'd argue these versions can be ignored. (if someone uses that version
still, they could at least use csc.exe directly via a Makefile generator)

So, since VS2005, I think you'd find small changes (new flags introduced,
etc.) but no major file format overhaul like from VC++ 2008 to VC++ 2010.

I'd also like to take this opportunity to point out that whoever does this
might want to consider supporting VB .NET also.  Everything in this
discussion is EXACTLY the same, except that the compiler name is different,
and project/source code file extensions are different.  It would be
relatively trivial to support VB .NET once you have C# working, if you wrote
the generator right.  (vbc.exe instead of csc.exe, vbproj instead of csproj,
.vb file instead of .cs file.  Compiler switches are probably almost
identical...  It's also MSBuild-based and also does a combined
"compile+link".)

Best regards,

James Johnston

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support?

2015-06-29 Thread J Decker
On Mon, Jun 29, 2015 at 10:05 AM, Brad King  wrote:

> On 06/26/2015 10:47 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> > Does it have a realistic chance to be accepted for upstream
>
> Yes, so long as it comes with proper tests and is not too intrusive
> on the overall design/implementation of CMake.
>
> In order to enable use of C# sources we should get
>
>  enable_language(CSharp)
>
> to work.  This is likely straightforward with the VS generators.
>
> One question is how things should be done for the Makefile and
> Ninja generators.  For these we need to construct command line
> invocations of the compiler.  I'm not very familiar with C#.
> Does it need separate compilation with dependencies or should one
> simply invoke the compiler with the entire list of sources in
> a response file or something?
>
>
the command line tool is 'mcs' (mono)
http://linux.die.net/man/1/mcs

and csc for .NET (windows)
https://msdn.microsoft.com/en-us/library/78f4aasd.aspx
(does support response file with @; from running csc /?)

it goes from source to .dll or .exe without .obj inbetween.

can compile with C# itself... but I guess there's no command line tool from
.NET itself (looks like it comes from visual studio)... something like
Power Shell can instance a compiler and build output.
(wonder if that was part of the sources includes in the .net source release)


Thanks,
> -Brad
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] C# support?

2015-06-29 Thread David Cole via cmake-developers
The C# compiler, csc.exe, takes all its arguments at once in one call
to build a library or executable. Listing all the sources, and its
references (other libraries it depends on) all at once. You can do it
as command line arguments, or as contents of a response file, or a
combination or arguments plus response file.

Conceptually, it's "just like Java."

They do have separate project files for it with VS, though. The
generators will need code to generate *.csproj files, rather than
custom commands in a vcxproj file, to make it seem like it's really
well-integrated with VS. Not sure if *.csproj files have evolved much
over the last few releases of VS -- I'd expect the major challenge
with this to be making sure CMake generates proper *.csproj files for
however many versions of VS it would take to make it acceptable.


D



On Mon, Jun 29, 2015 at 1:05 PM, Brad King  wrote:
> On 06/26/2015 10:47 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
>> Does it have a realistic chance to be accepted for upstream
>
> Yes, so long as it comes with proper tests and is not too intrusive
> on the overall design/implementation of CMake.
>
> In order to enable use of C# sources we should get
>
>  enable_language(CSharp)
>
> to work.  This is likely straightforward with the VS generators.
>
> One question is how things should be done for the Makefile and
> Ninja generators.  For these we need to construct command line
> invocations of the compiler.  I'm not very familiar with C#.
> Does it need separate compilation with dependencies or should one
> simply invoke the compiler with the entire list of sources in
> a response file or something?
>
> Thanks,
> -Brad
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support?

2015-06-29 Thread Brad King
On 06/26/2015 10:47 AM, Stuermer, Michael SP/HZA-ZSEP wrote:
> Does it have a realistic chance to be accepted for upstream

Yes, so long as it comes with proper tests and is not too intrusive
on the overall design/implementation of CMake.

In order to enable use of C# sources we should get

 enable_language(CSharp)

to work.  This is likely straightforward with the VS generators.

One question is how things should be done for the Makefile and
Ninja generators.  For these we need to construct command line
invocations of the compiler.  I'm not very familiar with C#.
Does it need separate compilation with dependencies or should one
simply invoke the compiler with the entire list of sources in
a response file or something?

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] C# support?

2015-06-26 Thread Stuermer, Michael SP/HZA-ZSEP
Hi and sorry for cross-posting this on both lists,

I checked the mailing list history about the C#/.NET support topic and realized 
that the interest in C# support seems to have declined a bit.

I am right now in the need of good C# support and adding external project files 
is not that much of an option to me. So I started hacking away everything that 
is needed for .csproj generation and support of mixed managed/unmanaged 
targets. Not yet done, but there is a light at the end of the tunnel.

Now the question: is there any real interest at all in this feature? Does it 
have a realistic chance to be accepted for upstream or will I have to maintain 
my own fork of CMake?


best regards,
Michael Stürmer


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers