From bcaecf6bcddfaec2b586bff870650a4a66b0ccc3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 4 Oct 2019 10:42:03 -0400 Subject: Teach check for single-language targets to consider all configurations --- Source/cmGeneratorTarget.cxx | 3 +-- Source/cmGlobalVisualStudioGenerator.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 0cc70c7..d5e58b0 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -6356,8 +6356,7 @@ bool cmGeneratorTarget::IsCSharpOnly() const this->GetType() != cmStateEnums::EXECUTABLE) { return false; } - std::set languages; - this->GetLanguages(languages, ""); + std::set languages = this->GetAllConfigCompileLanguages(); // Consider an explicit linker language property, but *not* the // computed linker language that may depend on linked targets. const char* linkLang = this->GetProperty("LINKER_LANGUAGE"); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index ed0cba7..6569e5e 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -810,8 +810,7 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly( // If there's only one source language, Fortran has to be used // in order for the sources to compile. - std::set languages; - gt->GetLanguages(languages, ""); + std::set languages = gt->GetAllConfigCompileLanguages(); // Consider an explicit linker language property, but *not* the // computed linker language that may depend on linked targets. // This allows the project to control the language choice in -- cgit v0.12