[CMake] Initial C# support (was Re: Adding support for new languages to CMake)

David Cole david.cole at kitware.com
Fri Oct 17 18:27:14 EDT 2008


I use ADD_CUSTOM_COMMAND to specify the exact C# compiler command line that
I want...
There is much more to full C# language support than just getting it to
compile/link successfully. (Involving .csproj files vs. .vcproj files,
resources, references, strong naming, blah, blah, blah.....)


HTH,
David


On Fri, Oct 17, 2008 at 6:07 AM, Mathieu Malaterre <
mathieu.malaterre at gmail.com> wrote:

> On Fri, Oct 17, 2008 at 11:24 AM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
> >>> just yesterday Mathieu Malaterre wrote that he is working on a c#
> >>> implementation:
> http://www.mail-archive.com/cmake@cmake.org/msg16699.html
> >>
> >> Pretty funny :)
> >> Anyway I did contact (private email) Eric, and will try to get things
> going.
> >
> > Ok I got the try compile + building executable working here:
> >
> > https://gdcm.svn.sf.net/viewvc/gdcm/Sandbox/CMakeCSharp/
> >
> > There is no intermediate representation in C#, and I could not figure
> > out how to skip the object building part, so for now I simply copy src
> > file to 'object' file, so that I can reference <OBJECTS> during the
> > executable linking.
> >
> > If some cmake guru could comment, I'd really appreciate.
>
>
> Quick question, here is how one create executable in C#:
>
>  SET(CMAKE_CSharp_LINK_EXECUTABLE
>    "<CMAKE_CSharp_COMPILER> <FLAGS> <OBJECTS> -out:<TARGET>.exe
> <LINK_LIBRARIES>")
>
> The problem here is that i need to prepend each added libary using
> "/r" , I could not figure out which flag dictate that (for now
> <LINK_LIBRARIES> expand to 'foo.dll', while I need '/r:foo.dll').
>
> thanks
>
> --
> Mathieu
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081017/f0458701/attachment.htm>


More information about the CMake mailing list