mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03: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
16 lines
370 B
C++
16 lines
370 B
C++
#include "UsefulManagedCppClass.hpp"
|
|
|
|
namespace CSharpLibrary
|
|
{
|
|
UsefulManagedCppClass::UsefulManagedCppClass()
|
|
{
|
|
auto useful = gcnew UsefulCSharpClass();
|
|
m_usefulString = useful->GetSomethingUseful();
|
|
}
|
|
|
|
void UsefulManagedCppClass::RunTest()
|
|
{
|
|
Console::WriteLine("Printing from Managed CPP Class: " + m_usefulString);
|
|
}
|
|
}
|