[cmake-developers] C# support?

David Cole DLRdave at aol.com
Mon Jun 29 13:31:03 EDT 2015


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 <brad.king at kitware.com> 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


More information about the cmake-developers mailing list