[cmake-developers] 3.12.0-rc1: C# project outputting as a "vcxproj" (C++ project)

Robert Dailey rcdailey.lists at gmail.com
Tue Jun 26 10:25:45 EDT 2018


To fix this issue for now I had to do this:

        set_property( TARGET ${project_name} PROPERTY LINKER_LANGUAGE CSharp )

I don't remember having to explicitly tell CMake that the project is
CSharp in the past; it was always able to deduce it before. Is this
considered a symptom of a bug? Or is this required behavior? To be
honest, I'm not sure what criteria is used by CMake to deduce the
linker language of targets, especially in the C# case. It appears that
introducing a link-level dependency from a C# project to a Managed C++
project, forces the parent project to be C++ as well.

On Tue, Jun 26, 2018 at 9:12 AM, Robert Dailey <rcdailey.lists at gmail.com> wrote:
> Using 3.12.0-rc1, if I create a C# project, but use
> `target_link_libraries` on it to pull in a dependency to a managed C++
> target, the C# project turns into a "vcxproj" after generation,
> whereas if I remove the "target_link_libraries()" call, it outputs as
> a "csproj" as I expect.
>
> Is this a known issue? Am I doing something wrong or is this a bug? I
> plan to spend some time debugging this in CMake if I get a chance.


More information about the cmake-developers mailing list