summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBastien Schatt <bastien.schatt@magestik.fr>2018-04-12 21:11:42 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-13 17:11:09 (GMT)
commitc8e98974d8a71ff048eea60e2949382d39d51383 (patch)
tree441ea2370e91ce44bb820f3be766a803d2ae7d19 /Source/cmVisualStudio10TargetGenerator.cxx
parent4984d8433edb05eac446542b561a31edf7a25783 (diff)
downloadCMake-c8e98974d8a71ff048eea60e2949382d39d51383.zip
CMake-c8e98974d8a71ff048eea60e2949382d39d51383.tar.gz
CMake-c8e98974d8a71ff048eea60e2949382d39d51383.tar.bz2
VS: Disallow ReferenceOutputAssembly in ProjectReference if not possible
Explicitly turn off `ReferenceOutputAssembly` in `ProjectReference` elements naming other project files whose types do not produce assemblies. We already do this for `C#` but it makes sense for other languages too. Fixes: #17906
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 13af167..22dca62 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3646,10 +3646,8 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
"{" + this->GlobalGenerator->GetGUID(name) + "}", 3);
this->WriteElem("Name", name, 3);
this->WriteDotNetReferenceCustomTags(name);
- if (csproj == this->ProjectType) {
- if (!this->GlobalGenerator->TargetCanBeReferenced(dt)) {
- this->WriteElem("ReferenceOutputAssembly", "false", 3);
- }
+ if (!this->GlobalGenerator->TargetCanBeReferenced(dt)) {
+ this->WriteElem("ReferenceOutputAssembly", "false", 3);
}
this->WriteString("</ProjectReference>\n", 2);
}