mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 07:11:52 +08:00

When specifying a pure C# target in the `target_link_libraries()` call to another C++ target, a `<ProjectReference>` was setup for it (we wanted this) but also a corresponding `.lib` was added under `<AdditionalDependencies>` (we didn't want this). This change introduces a check that prevents `.lib` linker options from being used when the corresponding target for that library is a C# target. Fixes: #17678
17 lines
339 B
C#
17 lines
339 B
C#
using System;
|
|
using CSharpLibrary;
|
|
|
|
namespace CSharpLinkFromCxx
|
|
{
|
|
internal class CSharpLinkFromCxx
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
Console.WriteLine("Starting test for CSharpLinkFromCxx");
|
|
|
|
var useful = new UsefulManagedCppClass();
|
|
useful.RunTest();
|
|
}
|
|
}
|
|
}
|