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

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Oct 17 06:07:14 EDT 2008


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


More information about the CMake mailing list