On Mon, Oct 3, 2011 at 10:22 AM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">On Sat, Oct 1, 2011 at 4:08 PM, Stephen Torri <span dir="ltr"><<a href="mailto:stephen.torri@gmail.com" target="_blank">stephen.torri@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Sat, 2011-10-01 at 13:50 -0400, David Cole wrote:<br>
> On Mon, Sep 26, 2011 at 11:37 AM, Stephen Torri<br>
> <<a href="mailto:stephen.torri@gmail.com" target="_blank">stephen.torri@gmail.com</a>> wrote:<br>
> I am using CMake to run SWIG to generate C# wrapper files for<br>
> a<br>
> project. While the attached CMakeLists.txt file produces a<br>
> Visual<br>
> Studio solutions that builds the C++ library, C# wrapper<br>
> library and<br>
> C# prototype executable I don't know first if I am using CMake<br>
> correctly in this case.<br>
><br>
> If it works, then it is not incorrect. :-)<br>
><br>
> add_custom_command is the "right" way to build C# files driven by a<br>
> CMakeLists.txt file at present.<br>
><br>
> We've had feature requests before to add better C# support, but no<br>
> serious funders to back a full implementation of generating *.csproj<br>
> files for C# libs and executables. See this bug report (and related<br>
> ones) for more info, specifically, this bug note:<br>
> <a href="http://public.kitware.com/Bug/view.php?id=7918#c22170" target="_blank">http://public.kitware.com/Bug/view.php?id=7918#c22170</a><br>
<br>
</div>David,<br>
<br>
I think I am just going to generate the files for now and build a<br>
separate C# project in Visual Studio by hand. The reason for doing that<br>
is I am trying to make it easy to maintain this project. I figure I can<br>
do it by hand for now and make it easy to read.<br>
<br>
Your point about having this feature request before makes me wonder.<br>
What does it take to implement support for a new language?</blockquote></div></div><div><br>Please keep the discussion on-list, so others may also participate in the discussion. (thx)<br><br>Support for a new language is not terribly difficult to implement, provided it has a compilation model similar to C/C++, and there is support for the language in all of the back-end build systems that CMake targets. It's quite easy actually, with the Makefile generators, to support C# even as a full featured CMake-supported language.<br>
<br>But it is non-trivial to support Visual Studio C# *.csproj project files such that they'll work like Visual Studio C# developers are accustomed to. Hence my comments in the bug reports...<br><br><br></div><div class="im">
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
Taking C#<br>
sharp as an example what parts of CMake does someone have to implement?<br></blockquote></div><div><br>C# related language module files, as documented in Chapter 11 of Mastering CMake. Specifically section 11.4, "Adding a New Language."<br>
<br>And *.csproj file generation support in many (all except for v6?) of the Visual Studio generator classes.<br><br><br>HTH,<br><font color="#888888">David<br><br></font></div></div>
</blockquote></div><br>