1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 10:47:59 +08:00
Files
CMake/Tests/CSharpLinkToCxx/cpp_native.cpp
Michael Stürmer 7e57e6ae12 VS: Do not reference output assemblies if not possible for CSharp target
Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to
CXX targets, 2017-06-20) CSharp targets get `ProjectReference` entries
to their dependencies.  This causes VS to also reference the
dependency's output assembly by default, which is incorrect for
non-managed targets.

Fix this by setting `ReferenceOutputAssembly` to `false` for targets
that can't provide output assemblies.  Unmanaged C++ targets (shared
libs & executables) can still be referenced and a warning will be shown
in the IDE but the build will not break anymore.

Fixes: #17172
2017-09-05 09:41:40 -04:00

11 lines
149 B
C++

#include "cpp_native.hpp"
#include <iostream>
namespace CppApp {
void MyCpp::testMyCpp()
{
std::cout << "#message from CppApp" << std::endl;
}
}