From 91754b4e6026974e6264329ec1fad478ced3cc6f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Sch=C3=B6nle?=
 <a.schoenle@abberior-instruments.com>
Date: Thu, 3 May 2018 19:39:54 +0200
Subject: VS: When not referencing output assembly do not try to copy it either

When generating a `ProjectReference` with `ReferenceOutputAssembly` set
to `false`, also set `CopyToOutputDirectory` to `Never`.  Otherwise
MSBuild might report a diagnostic like

    Project '<name>' is not up to date.
    CopyLocal reference '...\ZERO_CHECK' is missing from output location.

and rebuild the referencing project unnecessarily.
---
 Source/cmVisualStudio10TargetGenerator.cxx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 2e8a2eb..18ec7bf 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3816,6 +3816,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
       }
       if (dt->GetManagedType("") < check || unmanagedStatic) {
         e2.Element("ReferenceOutputAssembly", "false");
+        e2.Element("CopyToOutputDirectory", "Never");
       }
     }
     e2.EndElement();
-- 
cgit v0.12