[CMake] C# Language Detection Errors in 3.8.0-rc2

Wesley Smith wesley.hoke at gmail.com
Thu Mar 23 10:32:28 EDT 2017


Eventually I figured out the answer to this question after stepping through
the CMake project code.

DO:
enable_language(CSharp)

DONT:
enable_language(CSHARP)

Unlike C, CXX, FORTRAN, etc. CSharp is not an abbreviation requiring
capitalization of all letters.  Case matters.

On Thu, Mar 16, 2017 at 5:23 PM, Wesley Smith <wesley.hoke at gmail.com> wrote:

> I'm trying to test out the C# features added to 3.8.0.  A few things:
>
> + I couldn't find any documentation as to what the language name for
> CSHARP was in the enable_language documentation page
>
> + When I tried enable_language(CSHARP), I got some errors
>
> CMake Error at CMakeLists.txt:4 (enable_language):
> No CMAKE_CSHARP_COMPILER could be found.
>
> In the error log, I see:
>
> The CSharp compiler identification could not be found in
> "<snip>/build_/CMakeFiles/3.8.0-rc2/CompilerIdCSharp/
> CompilerIdCSharp.csproj"
>
> When I open this project, it compiles and runs just fine.  I'm not sure
> why it's giving an error.  Any thoughts?
>
> thanks,
> wes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170323/be548aea/attachment.html>


More information about the CMake mailing list