summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-03 12:04:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-03 12:04:35 (GMT)
commit9fc3024f62304a65c2fb1eaf5303e417530c650d (patch)
treeae35d758ba00f50b6ebaa5ed9634fe467137140a /Source/cmGeneratorTarget.cxx
parenta4b9e59568825a440bbbf04504cb556288aed456 (diff)
parent375b420fdfe4eb34e92b98bb648ba37de3691c2e (diff)
downloadCMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.zip
CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.gz
CMake-9fc3024f62304a65c2fb1eaf5303e417530c650d.tar.bz2
Merge topic 'fix-csharp-target-type'
375b420fdf CSharp: Fix regression in VS project type selection 8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2427
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 29c6058..80fb621 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5600,10 +5600,14 @@ bool cmGeneratorTarget::HasLanguage(std::string const& language,
{
std::set<std::string> languages;
this->GetLanguages(languages, config);
+ // The "exclusive" check applies only to source files and not
+ // the linker language which may be affected by dependencies.
+ if (exclusive && languages.size() > 1) {
+ return false;
+ }
// add linker language (if it is different from compiler languages)
languages.insert(this->GetLinkerLanguage(config));
- return (languages.size() == 1 || !exclusive) &&
- languages.count(language) > 0;
+ return languages.count(language) > 0;
}
void cmGeneratorTarget::ComputeLinkImplementationLanguages(