MantisBT - CMake
View Issue Details
0007918CMakeCMakepublic2008-11-03 04:312011-01-11 18:05
Mathieu Malaterre 
David Cole 
lowfeatureN/A
closedwon't fix 
CMake-2-6 
 
0007918: Add C# support
It would be nice if CMake would support C# natively (and not via the use of macro).
No tags attached.
related to 0001266closed David Cole Upcomming C# support should work with Portable.NET too 
Issue History
2008-11-03 04:31Mathieu MalaterreNew Issue
2008-11-03 04:34Mathieu MalaterreNote Added: 0014012
2008-11-03 17:00David ColeNote Added: 0014019
2008-11-05 17:37Bill HoffmanStatusnew => assigned
2008-11-05 17:37Bill HoffmanAssigned To => David Cole
2008-11-06 06:27Mathieu MalaterreNote Added: 0014046
2008-11-14 12:04Mathieu MalaterreNote Added: 0014111
2008-11-17 13:58David ColePrioritynormal => low
2008-11-17 13:58David ColeSeverityminor => feature
2008-11-17 13:58David ColeReproducibilityhave not tried => N/A
2008-11-20 03:50Mathieu MalaterreNote Added: 0014147
2009-12-29 09:30Arno RehnNote Added: 0019007
2010-07-06 15:48Dominique LeuenbergerNote Added: 0021255
2010-09-09 17:45David ColeNote Added: 0022170
2010-09-09 17:45David ColeStatusassigned => resolved
2010-09-09 17:45David ColeResolutionopen => won't fix
2011-01-11 18:05David ColeNote Added: 0024606
2011-01-11 18:05David ColeStatusresolved => closed
2011-01-26 13:41David ColeRelationship addedrelated to 0001266

Notes
(0014012)
Mathieu Malaterre   
2008-11-03 04:34   
Minimal support for C# can be found there:

https://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/CMakeCSharp/ [^]
(0014019)
David Cole   
2008-11-03 17:00   
The minimum contribution I would be comfortable with adding to CMake to be able to claim "C# support" would include adding resources to the built executables/dlls and generating real .csproj files for C# libraries and executables (rather than .vcproj files with custom build rules). (And working with the VS8 and VS9 generators at a minimum.)
(0014046)
Mathieu Malaterre   
2008-11-06 06:27   
<mind dump>
How should we support C# major version ? As of now:
* 1.1
* 2.0
* 3.5

1. at src file level
 set_source_files_properties(file1.cs PROPERTIES CSHARP_VERSION 3.5)

2. at project level
 PROJECT(bla CSHARP 1.1)
 PROJECT(bla CSHARP 2.0)
 PROJECT(bla CSHARP 3.5)

3. At target level

set_target_properties(bla PROPERTIES CSHARP_VERSION 3.5)

all of the above ?

</mind dump>
(0014111)
Mathieu Malaterre   
2008-11-14 12:04   
Issue with full path to src file, need to be windows style:

* http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/9d3ac7eb9f7f56be [^]

       cd C:\cygwin\home\mmalaterre\Projects\gdcm\release-cl\Examples
\Csharp
        C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /r:C:/
cygwin/home/mmalaterre/Projects/gdcm/release-cl/bin/./gdcm_csharp.dll /
out:C:/cygwin/home/mmalaterre/Projects/gdcm/release-cl/bin/./
ManipulateFile.exe C:/cygwin/home/mmalaterre/Projects/gdcm/trunk/
Examples/Csharp/ManipulateFile.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS1504: Source file 'c:\cygwin\home\mmalaterre\Projects\gdcm
\release-cl\Examples\Csharp\ManipulateFile.cs' could not be opened
('Le fichier sp‚cifi‚ est introuvable. ')
NMAKE : fatal error U1077: 'C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\csc.exe' : return code '0x1'
(0014147)
Mathieu Malaterre   
2008-11-20 03:50   
Actual cmake macros used in GDCM projects can be found here:

http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindCSharp.cmake [^]
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindDotNETFrameworkSDK.cmake [^]
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/FindMONO.cmake [^]
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/UseCSharp.cmake [^]
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/UseDotNETFrameworkSDK.cmake [^]
http://gdcm.svn.sf.net/viewvc/gdcm/trunk/CMake/UseMONO.cmake [^]
(0019007)
Arno Rehn   
2009-12-29 09:30   
I implemented C# as a cmake language for use with the C# bindings for KDE [1]. It currently relies on additional macros to create executables and libraries, because CMake currently only works with seperate build/link steps. C# compilers require all source files to be given on the command line and unify the build and link steps, though. So the initial requirement for C# support would be to have a single command for building and linking a target.

Links:
[1] http://websvn.kde.org/trunk/KDE/kdebindings/cmake/modules/ [^]
(0021255)
Dominique Leuenberger   
2010-07-06 15:48   
Has there been any activities / considerations on the solution of Arno?

I just integrated his files also in one of my projects that uses cmake as build system (and creates C# bindings) and this works fine for me.

Certainly, I only use a subset out of what Arno's cmake files offer, but it was enough for me. Having this directly in cmake integrated would have saved me a lot of hassle to get this to work.

I, and certainly many more, would appreciate having C# simplified in cmake build systems.
(0022170)
David Cole   
2010-09-09 17:45   
Built-in support for C# in CMake is not going to happen any time soon unless somebody volunteers to be its maintainer, including moving forward into the future with new C# compilers, new versions of Visual Studio, new ...

Or, unless somebody is willing to fund the development effort required to make this "as good as C++" support in CMake.

So... I'm closing this as "Won't Fix" until 1 of 2 things happens:
(1) we have a volunteer
(2) we have a serious funder
(0024606)
David Cole   
2011-01-11 18:05   
Closing resolved issues that have not been updated in more than 3 months.